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

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

Javier Molina
I don't think there's an API

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

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Uwe Reisewitz
Javier,thansk for the

Javier,

thansk for the information. Unfortunately this is not sufficient. I would need to know if we are currently in Admin or User mode.

Looks like I have to implement some sort of Admin-Mode myself into the app. Pity...

Best Regards

Uwe

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments