Stay organized with collections
Save and categorize content based on your preferences.
BatteryInfo
open class BatteryInfo
Describes a battery usage report.
Summary
Public constructors |
Create an uninitialized instance of BatteryInfo.
|
Create an instance of BatteryInfo initialized from a Parcel.
|
Public methods |
open Unit |
Dump a BatteryInfo instance to a Printer.
|
open Unit |
Save a BatteryInfo instance to a parcel.
|
Properties |
String! |
Checkin details.
|
Long |
Duration in microseconds over which the process used the above percentage of battery.
|
String! |
Dump of various info impacting battery use.
|
Int |
Percentage of the battery that was used up by the process.
|
Public constructors
BatteryInfo
BatteryInfo()
Create an uninitialized instance of BatteryInfo.
BatteryInfo
BatteryInfo(in: Parcel!)
Create an instance of BatteryInfo initialized from a Parcel.
Public methods
dump
open fun dump(
pw: Printer!,
prefix: String!
): Unit
Dump a BatteryInfo instance to a Printer.
writeToParcel
open fun writeToParcel(
dest: Parcel!,
flags: Int
): Unit
Save a BatteryInfo instance to a parcel.
Properties
checkinDetails
var checkinDetails: String!
Checkin details.
durationMicros
var durationMicros: Long
Duration in microseconds over which the process used the above percentage of battery.
usageDetails
var usageDetails: String!
Dump of various info impacting battery use.
usagePercent
var usagePercent: Int
Percentage of the battery that was used up by the process.
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# ApplicationErrorReport.BatteryInfo\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBatteryInfo\n===========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/ApplicationErrorReport.BatteryInfo \"View this page in Java\") \n\n```\nopen class BatteryInfo\n```\n\n|---|-----------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.app.ApplicationErrorReport.BatteryInfo](#) |\n\nDescribes a battery usage report.\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [BatteryInfo](#BatteryInfo())`()` Create an uninitialized instance of BatteryInfo. |\n| [BatteryInfo](#BatteryInfo(android.os.Parcel))`(`in:` `[Parcel](../os/Parcel.html#)!`)` Create an instance of BatteryInfo initialized from a Parcel. |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [dump](#dump(android.util.Printer,%20kotlin.String))`(`pw:` `[Printer](../util/Printer.html#)!`, `prefix:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Dump a BatteryInfo instance to a Printer. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [writeToParcel](#writeToParcel(android.os.Parcel,%20kotlin.Int))`(`dest:` `[Parcel](../os/Parcel.html#)!`, `flags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Save a BatteryInfo instance to a parcel. |\n\n| Properties ||\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [checkinDetails](#checkinDetails:kotlin.String) Checkin details. |\n| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [durationMicros](#durationMicros:kotlin.Long) Duration in microseconds over which the process used the above percentage of battery. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [usageDetails](#usageDetails:kotlin.String) Dump of various info impacting battery use. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [usagePercent](#usagePercent:kotlin.Int) Percentage of the battery that was used up by the process. |\n\nPublic constructors\n-------------------\n\n### BatteryInfo\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBatteryInfo()\n```\n\nCreate an uninitialized instance of BatteryInfo. \n\n### BatteryInfo\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBatteryInfo(in: Parcel!)\n```\n\nCreate an instance of BatteryInfo initialized from a Parcel.\n\nPublic methods\n--------------\n\n### dump\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun dump(\n pw: Printer!, \n prefix: String!\n): Unit\n```\n\nDump a BatteryInfo instance to a Printer. \n\n### writeToParcel\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun writeToParcel(\n dest: Parcel!, \n flags: Int\n): Unit\n```\n\nSave a BatteryInfo instance to a parcel.\n\nProperties\n----------\n\n### checkinDetails\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar checkinDetails: String!\n```\n\nCheckin details. \n\n### durationMicros\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar durationMicros: Long\n```\n\nDuration in microseconds over which the process used the above percentage of battery. \n\n### usageDetails\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar usageDetails: String!\n```\n\nDump of various info impacting battery use. \n\n### usagePercent\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar usagePercent: Int\n```\n\nPercentage of the battery that was used up by the process."]]