Atrius Android Mobile SDK

Version 4.1.1

Building the Reference Applications

1. Import Project into Android Studio

Using Android Studio, open and choose Import Project. Navigate to the project located in the reference-apps/{app-name} directory and choose OK

2. Update project configs

Change the values of the constants located at the top of to those provided to you by Acuity Brands
private String token = "your_token_here"; private String partnerId = "your_partner_id_here"; private String environmentId = "your_environment_id"; private String siteName = "your_site_here";

Installation of the Framework In Other Projects

1. Add libs repository

Add a directive in your project's build.gradle file to include your local libs directory as a repository. You may need to create a /libs directory in your project if one does not already exist
allprojects { repositories { flatDir { dirs 'libs' } // ... other repositories } }

2. Copy the binaries

Copy the .aar files from the sdk directory into the libs directory of your project

3. Declare dependencies

Add the following dependencies to your project's build.gradle
dependencies { compile 'com.acuitybrands:core:4.1.1@aar' compile 'com.acuitybrands:location:4.1.1@aar' compile 'com.acuitybrands:actionzone:4.1.1@aar' compile 'com.acuitybrands:route:4.1.1@aar' compile 'org.altbeacon:android-beacon-library:2.9.2' compile '' // ... other dependencies }

4. Add permissions

Add the following permissions to your project's AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.USE_CREDENTIALS"/> <uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>