ActivityManager.GetMemoryInfo(ActivityManager+MemoryInfo) Method

Definition

Return general information about the memory state of the system.

[Android.Runtime.Register("getMemoryInfo", "(Landroid/app/ActivityManager$MemoryInfo;)V", "GetGetMemoryInfo_Landroid_app_ActivityManager_MemoryInfo_Handler")]
public virtual void GetMemoryInfo(Android.App.ActivityManager.MemoryInfo? outInfo);
[<Android.Runtime.Register("getMemoryInfo", "(Landroid/app/ActivityManager$MemoryInfo;)V", "GetGetMemoryInfo_Landroid_app_ActivityManager_MemoryInfo_Handler")>]
abstract member GetMemoryInfo : Android.App.ActivityManager.MemoryInfo -> unit
override this.GetMemoryInfo : Android.App.ActivityManager.MemoryInfo -> unit

Parameters

outInfo
ActivityManager.MemoryInfo

ActivityManager.MemoryInfo

Attributes

Remarks

Return general information about the memory state of the system. This can be used to help decide how to manage your own memory, though note that polling is not recommended and ComponentCallbacks2.onTrimMemory(int) is the preferred way to do this. Also see getMyMemoryState(RunningAppProcessInfo) for how to retrieve the current trim level of your process as needed, which gives a better hint for how to manage its memory.

Android reference for android.app.ActivityManager.getMemoryInfo.

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