Code example for ConnectivityManager: Querying Network Reachability

Methods: getActiveNetworkInfo

0
     *            where files should be cached persistently ( 
     *            {@link AbstractCache#DISK_CACHE_INTERNAL}, {@link AbstractCache#DISK_CACHE_SDCARD} 
     *            ) 
     * @see HttpResponseCache 
     */ 
    public void enableResponseCache(Context context, int initialCapacity, long expirationInMinutes,
            int maxConcurrentThreads, int diskCacheStorageDevice) {
        enableResponseCache(initialCapacity, expirationInMinutes, maxConcurrentThreads);
        responseCache.enableDiskCache(context, diskCacheStorageDevice);
    } 
 
    /** 
     * Disables caching of HTTP responses. You may also choose to wipe any files that may have been 
     * written to disk. 
     */ 
    public void disableResponseCache(boolean wipe) {
        if (responseCache != null && wipe) {
            responseCache.clear();
        } 
        responseCache = null;
    }