SystemHealthManager
open class SystemHealthManager
kotlin.Any | |
↳ | android.os.health.SystemHealthManager |
Provides access to data about how various system resources are used by applications.
Summary
Public methods | |
---|---|
open HealthStats! |
Return a |
open HealthStats! |
takeUidSnapshot(uid: Int) Return a |
open Array<HealthStats!>! |
takeUidSnapshots(uids: IntArray!) Return a |
Public methods
takeMyUidSnapshot
open fun takeMyUidSnapshot(): HealthStats!
Return a HealthStats
object containing a snapshot of system health metrics for the application calling this API. This method is the same as calling takeUidSnapshot(Process.myUid())
.
Return | |
---|---|
HealthStats! |
A HealthStats object containing the metrics for this application. The keys for this HealthStats object will be from the UidHealthStats class. |
takeUidSnapshot
open fun takeUidSnapshot(uid: Int): HealthStats!
Return a HealthStats
object containing a snapshot of system health metrics for the given uid (user-id, which in usually corresponds to application).
Parameters | |
---|---|
uid |
Int: User ID for a given application. |
Return | |
---|---|
HealthStats! |
A HealthStats object containing the metrics for the requested application. The keys for this HealthStats object will be from the UidHealthStats class. |
See Also
takeUidSnapshots
open fun takeUidSnapshots(uids: IntArray!): Array<HealthStats!>!
Return a HealthStats
object containing a snapshot of system health metrics for the given uids (user-id, which in usually corresponds to application).
Parameters | |
---|---|
uids |
IntArray!: An array of User IDs to retrieve. |
Return | |
---|---|
Array<HealthStats!>! |
An array of HealthStats objects containing the metrics for each of the requested uids. The keys for this HealthStats object will be from the UidHealthStats class. |