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
- Windows 7, 8, 8.1, 10 (32- or 64-bit)
- Android Studio 2.2 or higher (includes OpenJDK)
- Java Development Kit (JDK) 7u45 or higher (optional)
Mac OS
- Mac OS X (aka macOS) 10.10.5 Yosemite or later
- Android Studio 2.2 or higher (includes OpenJDK)
- Java Development Kit (JDK) 7u75 or higher (optional)
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.
Uninstall prior EMDK installations and related files, if any.
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.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.
Click to enlarge; ESC to exit.
• If any version prior to 7.1 appears, select it and click the "Uninstall" button.
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..." button.
Click to enlarge; ESC to exit.
e. Enter "emdk" in the search box.
Then click "Search in repositories" as below: Click to enlarge; ESC to exit.
f. Select "EMDK for Android" and hit "Install" as below:
Click to enlarge; ESC to exit.
g. Click the "Restart Android Studio" button:
Click to enlarge; ESC to exit.
h. Click "Restart" to confirm and restart Android Studio.
Click to enlarge; ESC to exit.Enable the EMDK SDK:
a. Create or open an Android project.
b. Navigate to thebuild.gradle
file in the app module:
Click to enlarge; ESC to exit.
c. Add the following line to the dependencies section:dependencies { compileOnly 'com.symbol:emdk:x.x.x' ... }
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
- Close Android Studio, if open.
- From Windows -> All Programs -> Symbol EMDK for Android, select "Uninstall."
- 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:
- Remove SDK add-ons:
- Navigate to the
/Users/[userName]/Library/Android/sdk/add-ons
directory. - Remove any
addon-symbol_emdk-symbol-XX
folders.
- Navigate to the
- Remove Wizard Core:
- Navigate to the
/Users/Shared
directory. - Remove the "Symbol EMDK for Android" folder.
- Navigate to the
- 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:
Open Terminal app (in Finder -> Applications -> Utilities).
Paste the following into Terminal window (and hit RETURN):
defaults write com.apple.finder AppleShowAllFiles YES
Right-click on the Finder icon (in the Dock) while holding the "Option/alt" key.
Select "Relaunch" from the menu to make hidden files visible.
To reverse, replace "YES" with "NO" in the Terminal command and repeat Step 3.