Skip navigation

Hello Folks,

I would like to share my latest findings with community regarding a possibility to disable Home Button in MC40. Quite often we can see requests from our customer trying to achieve this programmatically however this is not possible by default on JB/KK. This additional feature has been added to the latest version of MC40JB(Rev B). This feature might be quite handy if you wish to lock down user in specific application and together with our EHS it is even more powerful. Following piece of code showing how should the intent look like and its parameter for disabling/enabling the Home Button.


Intent i = new Intent("com.motorolasolutions.intent.action.HOMEKEY_MODE");
i.putExtra("state", 1); 
1 - Enable
0 - Disable



Supported OS versions:

MC40N0 - Recovery OS Update Image v02.08.0520 for MC40N0 Android JellyBean Non-Voice SKU

MC40N0 - Recovery OS Update Image v02.08.0520 for MC40N0 JellyBean Voice SKU

MC40N0 - Recovery OS Update Image v02.08.0520 for MC40N0 Jelly Bean FIPS SKU

EMDK Projects in Android Studio

By now you have probably seen Google has released the new IDE for Android development, Android Studio. This new IDE is based on IntelliJ IDEA and thus no longer uses Eclipse. Prior to Android Studio, there were basically two options:

  • ADT Bundle
  • Ecliplse with ADT plugin for Eclipse

The current EMDK For Android supports both of these options (however you can no longer download ADT Bundle) and during the installation of EMDK For Android, one of the first prompts asks you which option you choose. Fear not, although we do not yet officially support Android Studio – you can still use it to build EMDK for Android based applications.

Using the ADT Plugin for Eclipse

During the installation of EMDK for Android, you are asked about your Android development environment:


If you are starting fresh,you would need to install stand alone Eclipse and the Android SDK separately and then provide the paths to each. Head over to the EMDK Setup guide for all of the not-so gory details.


Now you will be all set. Even though you may want to use Android Studio for development, we currently don’t have full integration, so you will need to have this Eclipse setup handy when you want to use Profile Manager features. If you just want to use the Native Barcode Java APIs, then you can practically use Android Studio stand alone.

Importing Existing EMDK Projects

Once you install Android Studio, you will want to import one of our samples to just test things out before you start/continue any full development. It is probably a good idea to just build a basic Android app using the Android Studio project wizards (they have some really cool new templates like Google Maps and Cloud Services).

  1. From Android Studio, select File\Import Project


  2. Then put in the folder where the samples are locations C:\Users\Public\Symbol EMDK for Android\v3.0\Samples\ADT. You should see the list of samples:


  3. Keep the rest of the default settings in the Import Wizard.



  4. It will then crank out a new Android Studio project and give you a nice report saying what it did. Pay attention to the new project structure (which is quite different then previous Android projects)



  5. Now wait a few minutes for the Gradle scripts to finish executing.

If there were no errors, then you should be able to just launch the application without any issues.

Fixing the SDK Linkage

After the Gradle script completed, you may notice an error in your project.If you open the file, you will see that it does not recognize the EMDK libraries.


Have no fear, this can easily be fixed. Right click on the project and select Open Module Settings.


In the Compile Sdk Version, you will notice that the EMDK version is not listed.


All you need to do is manually type it in. Either enter Symbol Technologies, Inc.:EMDK 3.0 (API 19):19 or Symbol Technologies, Inc.:EMDK 3.0 (API 16):16


After the Gradle scripts finish executing, there should no longer be any errors and you can then run the project.


If your project uses the Profile Manager features, you know there is a EMDKConfig.xml file that resided in the Assets folder. Under the new Android Studio project, you will also see it under the assets folder under the app folder:


Since we do not yet have the Profile Manager wizard integrated, you will not be able to generate this XML file directly from inside of Android Studio. This is where the previous Eclipse installation comes in handy. Simply generate the XML file within Eclipse and then copy it to your Android Studio project.


Creating New Projects

You can use the Android New Project wizard to start new development, however after creating the project you still need to follow the Fixing the SDK Linkage section above to properly enable the EMDK For Android. As of now the EMDK option does not come up in the list, you have to manually enter it (as mentioned above). You can then follow any of the previous tutorials we have – of course ignoring anything that mentioned ADT Bundle or shows the old project wizards.


Let me know what you think about Android Studio – would love to hear any feedback on how we can make your EMDK For Android developer experience a better one. Stay tuned for further developments on Android Studio.

Enterprise devices without Google Play Services are not able to directly use Google's Network Provider within Android.  This can be challenging for situations where you may want a rough position indoors or do not want to spend the time and battery life on precise GPS updates.  Check out this How-To that shows how you can call the Google Geolocation web service API directly from your Android application:


Android Coarse Locationing without Google Play Services

Filter Blog

By date:
By tag: