public class CacheUtils extends Object
| Constructor and Description |
|---|
CacheUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getApplicationVersionCode(android.content.Context c)
Get the current version code number of the app
|
static int |
getBitmapMemoryCacheSize(android.content.Context context)
Calculates the memory cache
|
static long |
getCurrentRam(android.content.Context c)
Get the current free ram in Mega Bytes
|
static File |
getDiskCacheDir(android.content.Context c)
Get the path to the disk (as
File), where the disk cache can store his cache entries |
static int |
getMemoryClass(android.content.Context c)
Get the memory class.
|
public static int getMemoryClass(android.content.Context c)
Return the approximate per-application memory class of the current device. This gives you an idea of how hard a memory limit you should impose on your application to let the overall system work best. The returned value is in megabytes; the baseline Android memory class is 16 (which happens to be the Java heap limit of those devices); some device with more memory may return 24 or even higher numbers.
c - public static long getCurrentRam(android.content.Context c)
public static int getBitmapMemoryCacheSize(android.content.Context context)
context - public static int getApplicationVersionCode(android.content.Context c)
Copyright © 2015 Hannes Dorfmann. All rights reserved.