Code example for ActivityManager

Methods: getMemoryClass

0
    ActivityManager activityManager;
 
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        tvMemory.setText("当前设备中每个app可用内存为 " + activityManager.getMemoryClass() + " M");
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java