How to reboot a device using EMDK

M Matt Laser 3 years ago
48 1 0

So, I've read through the Power Managment tutorial. While I can follow the tutorial, it seems like a lot of extra work is done with manual additions to the XML. My understanding of the XML profiles is that they should declare permissions, that can then be acted upon through the code, similar to the way that the Scanner API can be accessed.
 
While I'm aware this isn't how it works, this is what I expect:
 
PowerManager powerManager = (PowerManager) emdkManager.getInstance(EMDKManager.FEATURE_TYPE.POWER);
powerManager.reboot();
 
Obviously, this isn't the case, but is there a way I can do something similar? My hope would be to declare my profile ahead of time (rather than parse XML at runtime), and simply operate based off of these predefined capabilities.

Please register or login to post a reply

1 Replies

V Vedsatx Saddvv

Matt, xml parsing is not necessary, unless you want to parse for an error.  Just setup your profile to reboot the device and submit via process profile. There is also a sample app Rebooting The Device - Zebra Technologies Online Documentation

In the sample in the modifyProfile_XMLString() method just pass an empty string as  modifyData.
i.e.  modifyData[0]= ""

CONTACT
Can’t find what you’re looking for?