How to tell if running on Zebra Device

// Expert user has replied.
K Karen Bench 3 years 7 months ago
99 1 0

A few months ago I saw an archive of one of the Zebra developer talks that showed a code sample of how to detect at run time if the app is running on a zebra device. Now I can't find it! I want to be able to run my work app I am developing on my android phone. This way I can not invoke the emdk functions if I am not on the real hardware but the rest of my app could function. Does anyone know how to detect if running on a Zebra device? The one I have is a TC8000.

Please Register or Login to post a reply

1 Replies

P Pietro Francesco Maggi

Hi Karen,
you can use the standard Android SDK to indentify the device manufacturer.
There's an explanation on how to do this on the EMDK's Guides:
EMDK for Android Programming Practices - Zebra Technologies TechDocs

Another option is that you check if the EMDK library is available on the device:
EMDK for Android Programming Practices - Zebra Technologies TechDocs

I build a small demo app that show how to do both things. Is not updated but you should get the idea:
GitHub - pfmaggi/GetDeviceInfo_EMDK: Sample application showing device info. If the app is running on a Zebra/Symbol dev…

~Pietro

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