EMDK for Xamarin: How can I detect an active Kiosk Mode

U Uwe Reisewitz 2 years 11 months ago
15 1 0

Hi,
I would like to disable the option dialogs in my app if the scanner is set to kiosk mode.
How can I detect this and act accordingly?

I'M using EMDK for Xamarin 2.7

Thanks in advance

Best Regards
Uwe

Please register or login to post a reply

1 Replies

J Javier Molina

I don't think there's an API specifically for that, but you can find if EHS is the default launcher. If that is enough for your use case, here's some sample code to get the current launcher (from How to get the package name of current launcher in android? - Stack Overflow ):

PackageManager localPackageManager = getPackageManager();    Intent intent = new Intent("android.intent.action.MAIN");    intent.addCategory("android.intent.category.HOME");    String str = localPackageManager.resolveActivity(intent,                PackageManager.MATCH_DEFAULT_ONLY).activityInfo.packageName;
The package name for EHS is (as of today, subject to change) "com.symbol.enterprisehomescreen"

Javier Molina
Technical Architect, Kutir Mobility
Posted on behalf of Zebra Technologies

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