get Available ROM - Android android.app

Android examples for android.app:ActivityManager

Description

get Available ROM

Demo Code

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;
  }

}

Related Tutorials