Stay organized with collections
Save and categorize content based on your preferences.
PackageHealthStats
class PackageHealthStats
Keys for HealthStats
returned from HealthStats.getStats(int)
with the UidHealthStats.STATS_PACKAGES
key.
Summary
Constants |
static Int |
Key for a map of the number of times that a package's wakeup alarms have fired while the device was on battery.
|
static Int |
Key for a HealthStats with ServiceHealthStats keys for each of the services defined in this apk.
|
Constants
MEASUREMENTS_WAKEUP_ALARMS_COUNT
static val MEASUREMENTS_WAKEUP_ALARMS_COUNT: Int
Key for a map of the number of times that a package's wakeup alarms have fired while the device was on battery.
Value: 40002
STATS_SERVICES
static val STATS_SERVICES: Int
Key for a HealthStats with ServiceHealthStats
keys for each of the services defined in this apk.
Value: 40001
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# PackageHealthStats\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nPackageHealthStats\n==================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/os/health/PackageHealthStats \"View this page in Java\") \n\n```\nclass PackageHealthStats\n```\n\n|---|-------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.os.health.PackageHealthStats](#) |\n\nKeys for [HealthStats](/reference/kotlin/android/os/health/HealthStats) returned from [HealthStats.getStats(int)](/reference/kotlin/android/os/health/HealthStats#getStats(kotlin.Int)) with the [UidHealthStats.STATS_PACKAGES](/reference/kotlin/android/os/health/UidHealthStats#STATS_PACKAGES:kotlin.Int) key.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [MEASUREMENTS_WAKEUP_ALARMS_COUNT](#MEASUREMENTS_WAKEUP_ALARMS_COUNT:kotlin.Int) Key for a map of the number of times that a package's wakeup alarms have fired while the device was on battery. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [STATS_SERVICES](#STATS_SERVICES:kotlin.Int) Key for a HealthStats with [ServiceHealthStats](/reference/kotlin/android/os/health/ServiceHealthStats) keys for each of the services defined in this apk. |\n\nConstants\n---------\n\n### MEASUREMENTS_WAKEUP_ALARMS_COUNT\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val MEASUREMENTS_WAKEUP_ALARMS_COUNT: Int\n```\n\nKey for a map of the number of times that a package's wakeup alarms have fired while the device was on battery. \n\n Value: 40002\n\n**See Also**\n\n- [android.app.AlarmManager](../../app/AlarmManager.html#) \n\n### STATS_SERVICES\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val STATS_SERVICES: Int\n```\n\nKey for a HealthStats with [ServiceHealthStats](/reference/kotlin/android/os/health/ServiceHealthStats) keys for each of the services defined in this apk. \n\n Value: 40001"]]