Share via


ActivityManager.MemoryClass Property

Definition

Return the approximate per-application memory class of the current device.

public virtual int MemoryClass { [Android.Runtime.Register("getMemoryClass", "()I", "GetGetMemoryClassHandler")] get; }
[<get: Android.Runtime.Register("getMemoryClass", "()I", "GetGetMemoryClassHandler")>]
member this.MemoryClass : int

Property Value

Attributes

Remarks

Return the approximate per-application memory class of the current device. This gives you an idea of how hard a memory limit you should impose on your application to let the overall system work best. The returned value is in megabytes; the baseline Android memory class is 16 (which happens to be the Java heap limit of those devices); some devices with more memory may return 24 or even higher numbers.

Java documentation for android.app.ActivityManager.getMemoryClass().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to