Android examples for android.app:ActivityManager
get Available ROM
import android.app.ActivityManager; import android.app.ActivityManager.MemoryInfo; import android.content.Context; public class Main { public static long getAvailableROM(Context context) { ActivityManager am = (ActivityManager) context.getSystemService(context.ACTIVITY_SERVICE); MemoryInfo outInfo = new MemoryInfo(); am.getMemoryInfo(outInfo);/*w w w . j a v a 2 s.c o m*/ return outInfo.availMem; } }