Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 528
Registered: ‎10-06-2009
My Device: 9800,BB Dev Alpha,z10 limited edition
My Carrier: Vodafone

How to know application's battery usage?

Hi,

 

I want to know application's battery usage I mean how much battery will be consumed by email,bluetooth,video etc.How can I know that? is there any API available

Rujuta Trivedi
Developer
Posts: 134
Registered: ‎02-24-2013
My Device: BlackBerry Z10 LE
My Carrier: Telcel

Re: How to know application's battery usage?

Hi, trevedirujuta

 

The API that can be used for battery usage is <bb/cascades/batteryInfo>

 

Unfortunately it does not provide the information you need, what you know is:

 

Charging Count
Load level
Battery Status

Battery Condition
Charge Compensation (mAh)
Temperature

 

For more info, chechk it this:

http://developer.blackberry.com/cascades/reference/bb__device__batteryinfo.html

 

Regards

Developer
Posts: 528
Registered: ‎10-06-2009
My Device: 9800,BB Dev Alpha,z10 limited edition
My Carrier: Vodafone

Re: How to know application's battery usage?

But can I know if I turn off some functionality then how much battery can I save? e.g if I turn off wifi then the battery will last for x hours.

Rujuta Trivedi