ActivityManager.GetRunningServices(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Return a list of the services that are currently running.
[Android.Runtime.Register("getRunningServices", "(I)Ljava/util/List;", "GetGetRunningServices_IHandler")]
public virtual System.Collections.Generic.IList<Android.App.ActivityManager.RunningServiceInfo>? GetRunningServices(int maxNum);
[<Android.Runtime.Register("getRunningServices", "(I)Ljava/util/List;", "GetGetRunningServices_IHandler")>]
abstract member GetRunningServices : int -> System.Collections.Generic.IList<Android.App.ActivityManager.RunningServiceInfo>
override this.GetRunningServices : int -> System.Collections.Generic.IList<Android.App.ActivityManager.RunningServiceInfo>
Parameters
- maxNum
- Int32
The maximum number of entries to return in the list. The actual number returned may be smaller, depending on how many services are running.
Returns
Returns a list of RunningServiceInfo records describing each of the running tasks.
- Attributes
Remarks
This method was deprecated in API level 26. As of Build.VERSION_CODES.O, this method is no longer available to third party applications. For backwards compatibility, it will still return the caller's own services.
Return a list of the services that are currently running. Note: this method is only intended for debugging or implementing service management type user interfaces.
Throws: SecurityException
Android reference for android.app.ActivityManager.getRunningServices.
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.