Android examples for android.os:Memory
get One App Max Memory
import android.app.ActivityManager; import android.content.Context; public class Main { public static long getOneAppMaxMemory(Context context) { if (context == null) { return -1;// w w w .java 2 s . com } ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); return activityManager.getMemoryClass() * 1024 * 1024; } }