MC18 - Undocked.

Hi,

Just wanting to know if anyone else with Android MC18 units are seeing them reporting as UnDocked when sitting in the three slot cradle? I have a UK customer that has seen several dozen units become "Undocked" after a period of time.

 

Any thoughts as to what may be happening here?

 

Thanks

 

Andy

Andrew Wood
Hi Bill,Ive asked and just

Hi Bill,

Ive asked and just got this back -

I've just had a look through the code, and it looks like we are using the following intent:

Intent.ACTION_BATTERY_CHANGED

So I believe if there is a problem with the battery reporting back its status, the app could potentially believe its not docked however I'd like to get a colleague  to confirm this.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hey Andrew, Have a look at

Hey Andrew, Have a look at this discussion ( )

The broadcasts that should be monitored are android.intent.action.ACTION_POWER_DISCONNECTED and android.intent.action.ACTION_POWER_CONNECTED

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hello Andrew, What API are

Hello Andrew, What API are they using to detect that the device is undocked?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Andrew Wood
Bill,The developer has just

Bill,

The developer has just come back with some usefull info - glad to get your thoughts please. I need a work around or some such.

I've made an interesting discovery: when the battery becomes fully charged, a BATTERY_CHANGED status is broadcast that indicates the device has become unplugged (plugged = 0) and that the battery is discharging (status = 3).

However - the MC18 is *still* in the cradle !

I've captured the BATTERY_CHANGED intent :

intent = Intent { act=android.intent.action.BATTERY_CHANGED flg=0x60000010 (has extras) }

mAction = android.intent.action.BATTERY_CHANGED

mExtras = Bundle[{battery_type=201, battery_percent_decommission_threshold=75, technology=Li-ion, battery_usage_decommission_threshold=400, icon-small=17302931, present_capacity=2454, time_to_empty=1080, seconds_since_first_use=33523412, health=2, total_cumulative_charge=171913, status=3, ratedcapacity=2625, plugged=0, present=true, mfd=2015-04-14, level=99, base_cumulative_charge=171916, scale=100, partnumber=BT000018A01 Rev.01, temperature=260, voltage=4174, serialnumber=A2249, bkvoltage=2526, health_percentage=95, time_to_full=65535, invalid_charger=0, present_charge=2429, battery_decommission=0}]

mFlags = 1610612752

I've also attached a screenshot of the debugger in action.

It seems like a bug because when the battery is fully charged and in the cradle, I would logically expect to see plugged = 1, and battery status = 3

Currently this is a big problem because devices become fully charged in the cradle and by the end of the day a lot of devices will be in the cradle, yet MQTT will announce them as out of the cradle.

-----------------------------------------------------------------------------------------------

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Andrew Wood
(No subject)

Capture_ss151.JPG

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hey Andrew, see my previous

Hey Andrew, see my previous post.

In order to monitor if the device is in or out of the cradle, you must monitor the following intents. Monitoring battery changed will not give you an accurate indication of dock status.

The broadcasts that should be monitored are:

android.intent.action.ACTION_POWER_DISCONNECTED andandroid.intent.action.ACTION_POWER_CONNECTED

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments