Overview
This tutorial will aid you creating a new Android application project using Android Studio.
Creating The Project
Open Android Studio. If you have a previous project open, close the project by clicking Close Project from the File menu.
Select Start a new Android Studio project under Quick Start section.
In the new project wizard we need to assign Application Name specific to your tutorial of EMDK feature along with Company Domain and click "Next".
Select the Minimum SDK that supports the SDK features your project requires and click Next.
Select Blank Activity option on Add an activity to Mobile screen and click Next.
Click Finish and your new Android Studio project will be created.
Note: The
\assets
folder is not present in the project structure but Profile Manager will create this folder when needed.
Enable the EMDK for Android in your project
Set EMDK as Compile SDK in Project Structure
After completing the steps in Creating The Project
- Select Project Structure from the File menu.
- In the Project Structure window select app from the left pane under Modules.
- Now select EMDK APIs, Android 23, rev XXX (API XX) in from the **Compile Sdk Version drop-down box.
- Now click the OK button.
Your project is now ready to use the EMDK for Android APIs
EMDK as a dependency in gradle.build
Use this method to make use of the EMDK APIs in a project where the Compile SDK set above an Android API level that the EMDK currently has an Addon for.
After completing the steps in Creating The Project
In the project folder viewer, open the build.gradle file for the app module.
Add the following to the dependencies section
Windows
dependencies { provided fileTree(include: ['com.symbol.emdk.jar'], dir: 'C:\\Users\\<YOUR USER NAME>\\AppData\\Local\\Android\\sdk\\add-ons\\addon-symbol_emdk-symbol-19\\libs') compile fileTree(exclude: ['com.symbol.emdk.jar'], dir: 'libs')
Mac
dependencies { provided fileTree(include: ['com.symbol.emdk.jar'], dir: '/Users/<YOUR USERNAME/Library/Android/sdk/add-ons/addon-symbol_emdk-symbol-19/libs') compile fileTree(exclude: ['com.symbol.emdk.jar'], dir: 'libs')
Now rebuild your project by selecting Make Project from the Build menu.
Your project is now ready to use the EMDK for Android APIs