Android examples for Hardware:Memory
get Available ROM
//package com.java2s; 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 ww . j av a 2s .c o m return outInfo.availMem; } }