EMDK Setup

EMDK For Android 7.0

Overview

This document describes how to set up Mac OS and Windows computers to work with Zebra's EMDK for Android software development kit. EMDK extends Android Studio with tools to interface and configure Zebra Android devices and their peripherals, including imagers, scanners and serial ports. EMDK tools enable developers to easily create powerful line-of-business applications that help maximize workflow efficiency.

Prerequisites

The following software is required to use EMDK for Android:

Windows

Mac OS

Note: Zebra recommends OpenJDK, which is bundled with Android Studio 2.2 and higher.


Install EMDK Plug-ins

The following instructions apply to Android Studio, which is required to use EMDK for Andriod and must be installed to complete the steps below. If necessary, install Android Studio before proceeding.

Note: Mac OS and Windows dialog boxes might vary slightly.

  1. Uninstall prior EMDK installations and related files, if any.

  2. Activate OpenJDK:
    a. Open an Android Studio project (if not already open).
    b. Select File -> Project Structure.
    c. In the left-hand pane select "SDK Location" (if not already selected).
    d. Confirm that "Use embedded JDK (recommended)" is checked. Click OK.

  3. Install the EMDK Profile Manager plug-in:
    a. In Android Studio -> Preferences.
    b. In the left-hand pane, select "Plugins" to bring up Plug-in settings.
    c. Enter "emdk" in the search box:
    • If no result appears, skip to Step d.
    image Click to enlarge; ESC to exit.
    • If any version prior to 7.0 appears, select it and click the "Uninstall" button.
    image Click to enlarge; ESC to exit.
    • Click the "Restart Android Studio" button.
    • Select File -> Settings.
    • In the left-hand pane, select "Plugins" to bring up Plug-in settings.
    • Proceed to Step d.
    d. Click "Browse repositories...".
    image Click to enlarge; ESC to exit. Dialog boxes might vary from one version to another.
    e. Enter "emdk" in the search box.
    Then click "Search in repositories" as below: image Click to enlarge; ESC to exit.
    f. Select "EMDK for Android" and hit "Install" as below:
    image Click to enlarge; ESC to exit.
    g. Click the "Restart Android Studio" button:
    image Click to enlarge; ESC to exit.
    h. Click "Restart" to confirm and restart Android Studio.
    image Click to enlarge; ESC to exit.

  4. Enable the EMDK SDK:
    a. Create or open an Android project.
    b. Navigate to the build.gradle file in the app module:
    image Click to enlarge; ESC to exit.
    c. Add the following line to the dependencies section:

    
        dependencies {
        compileOnly 'com.symbol:emdk:x.x.x'
            ...
        }
    
  5. Rebuild the project (Build -> Make Project).

EMDK APIs are now ready to use.

Notes

  • A plus sign ("+") can be substituted for a major or minor version number in the dependencies section. For example, declaring com.symbol:emdk:7.1+ uses SDK versions 7.1 and newer.
  • The Java version used to compile a project is based on the compileSdkVersion selected for the project. Different versions of Android support different versions of Java. If necessary, the default Java version can be overridden. Learn more.

Uninstall EMDK

Windows

  1. Close Android Studio, if open.
  2. From Windows -> All Programs -> Symbol EMDK for Android, select "Uninstall."
  3. Follow prompts to complete the uninstallation.

Mac OS

Note: This process references folders that are hidden by default. To unhide, see section below.

In the Mac OS Finder:

  1. Remove SDK add-ons:
    • Navigate to the /Users/[userName]/Library/Android/sdk/add-ons directory.
    • Remove any addon-symbol_emdk-symbol-XX folders.
  2. Remove Wizard Core:
    • Navigate to the /Users/Shared directory.
    • Remove the "Symbol EMDK for Android" folder.
  3. Remove Wizard plug-in:
    • Open Applications folder.
    • Locate and right-click Android Studio app.
    • Select "Show Package Contents" from the menu.
    • Navigate to Contents -> plugins directory.
    • Remove com.symbol.emdk.wizard.intellijIdea folder, if present.

To unhide Mac OS folders:

  1. Open Terminal app (in Finder -> Applications -> Utilities).

  2. Paste the following into Terminal window (and hit RETURN):

    
    defaults write com.apple.finder AppleShowAllFiles YES
    
  3. Right-click on the Finder icon (in the Dock) while holding the "Option/alt" key.

  4. Select "Relaunch" from the menu to make hidden files visible.

  5. To reverse, replace "YES" with "NO" in the Terminal command and repeat Step 3.