urgent: how to retrieve percent decommission threshold using battery intent?

Hi guys,

 

I read about percent decommission threshold from:

 

http://techdocs.zebra.com/emdk-for-android/4-0/mx/batterymgr/

 

and learned about retrieving values from following link.

 

The article doesn't mention what 'extra' name to use to get the percent decommission threshold and the link to the sample project is missing (404).

 

How do I get the percent decommission threshold value from the battery intent? Thanks!

 

http://techdocs.zebra.com/emdk-for-android/4-0/tutorial/tutbatteryintent/

Anonymous (not verified)
Hey Ben,  the Intent API

Hey Ben,  the Intent API reference is here.  For which device are you trying to pull this battery data?  It looks like the Intent extra you are looking for is "battery_decommission"

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Ben Lam
Thanks for your fast response

Thanks for your fast response Bill, the exact device is to be determined (TBD). I have a MC67 to test without gifted battery (which I understand is necessary for percent decommission threshold). Obviously not ideal but I hope to code it in right so when gifted battery is available the app will 'just work'.

It seems to me battery_decommission is battery decommission status ('return values' listed in same order as values listed under 'features'). I was hoping the sample project may have more details but I get a 404 when I try to download.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Ben,  Here is a link to the

Ben,  Here is a link to the Battery Intent Sample, I will update the links in the EMDK documentation as soon as possible.   The sample does not have any further info on the intent extra you are looking for.  Waiting on a response from engineering to know if that data  was exposed through the intent. If it is exposed it would only be for the MC18 or MC40.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Ben Lam
Thanks Bill,A follow up

Thanks Bill,

A follow up question please, if the percent decommission threshold isn't exposed through the intent, how can I get the value programmatically or otherwise?

I'm not very familiar with EMDK for android but I looked at the API index and it seems the only way to get battery info is through the intent (vs for ex. straight up Java).

I noticed the article where I learned about the percent decommission threshold is under MX.

Perhaps the idea is one can use MX to set the percent decommission threshold but the idea is to not read the percent decommission threshold but only the decommission status (battery_decommission)? The battery intent API article doesn't mention what kind of values battery_decommission may contain nor if it's a string or int type.

I would appreciate some clarification on battery_decommission, I am hoping customer is satisfied with using that vs percent decommission threshold.

API index: http://techdocs.zebra.com/emdk-for-android/4-0/api/

article explaining percent decommission threshold: http://http://techdocs.zebra.com/emdk-for-android/4-0/mx/batterymgr/

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Ben, Just heard back from

Ben, Just heard back from engineering, the following battery extras are exposed on the MC40 and MC18.

battery_percent_decommission_threshold   - for gifted battery

battery_usage_decommission_threshold     - for smart battery

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Ben Lam
Thanks Bill,Works great!

Thanks Bill,

Works great! Customer will be happy

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments