How to detect when Zebra PS20 personal shopper is removed from cradle

181 views Asked by At

How to discover when Zebra PS20J personal shopper is taken from smart cradle when cradle is unlocked?

Zebra Enterprise Browser 2 is used in Android 8.

I tried in javascript in browser

const unlockparam = {
  "ledOnDuration": 1000,
  "ledOffDuration": 1000,
  "timeout": 10,
  "smoothingEffect": true
};

EB.SmartCradle.unlockEx(unlockparam, function () {
  console.write('Device is taken from Cradle');
});

But unlock callback fires immediately after unlocking, not after device is taken.

How to detect device detach from cradle? I tried to poll cradle wallId property using:

EB.SmartCradle.getProperty("wallId") !== 0

But wallId returns value even after PS20 is removed from cradle. Haven't found any description about it in Zebra SmartCradle API reference in https://techdocs.zebra.com/enterprise-browser/latest/api/smartcradle/

Getting device from cradle stops charging. Is it possible/reasonable to check charging state to dedect removal using API like https://developer.mozilla.org/en-US/docs/Web/API/Battery_Status_API?

I posted this also in Zebra developers forum in https://developer.zebra.com/content/how-dedect-when-ps20j-removed-cradle but havent got response.

0

There are 0 answers