Android examples for android.os:Memory
get Threshold Memory
import android.app.ActivityManager; import android.content.Context; public class Main { public static long getThresholdMemory(Context context) { if (context == null) { return -1;/*w w w.ja v a 2s . c o m*/ } ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); ActivityManager.MemoryInfo info = new ActivityManager.MemoryInfo(); activityManager.getMemoryInfo(info); return info.threshold; } }