How to Install the Android SDK
The following steps describe how to setup and initialize the Android SDK.
Setup
First, download the latest version TigerConnect Android SDK. Note that the SDK itself is not open source; please contact TigerConnect to get access to the SDK.
In your project's base directory, create a folder called
ttandroidand place thettandroid.aarfile inside.Then add a
build.gradlefile with:configurations.create("default")artifacts.add("default", file('ttandroid-4.0.0.aar'))Your directory structure should then look like the following:
build.gradlesettings.gradle...YOUR_APP/build.gradlesrc/...ttandroid/ttandroid.aarbuild.gradleNext, add the
:ttandroidmodule to your settings.gradle. Yoursettings.gradleshould already be including your application module.include ':app', ':ttandroid'Until we publish to an artifact repository, you will need to manually add the dependencies of the ttandroid.aar since AAR's don't (by default) come with their dependencies bundled.
Open your app's
build.gradle(YOUR_APP/build.gradlein this case) and add these lines, this includes the instruction for compiling thettandroid.aaras well as the items for multidexing (as it will be necessary). You will also need some flavor of the support v7 library.android {...defaultConfig {...multiDexEnabled true}}dependencies {...implementation fileTree(dir: 'libs', include: ['*.jar'])implementation project(':ttandroid')implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"implementation 'com.github.heremaps:oksse:2d7217296d'implementation "com.parse.bolts:bolts-tasks:1.4.0"implementation 'com.google.firebase:firebase-core:16.0.8'implementation "com.google.firebase:firebase-messaging:17.6.0"implementation 'net.zetetic:android-database-sqlcipher:4.2.0'implementation 'android.arch.persistence:db:1.1.1'implementation 'com.squareup.retrofit2:retrofit:2.5.0'implementation 'com.jakewharton.timber:timber:4.7.1'}
Your project should now be able to compile with everything set up.
MultiDex
Since you will likely be needing to turn have multidex on, the least complex way to get MultiDex going with your application is to add the code below to your Application class.
public class MyApplication extends MultiDexApplication {...}
There are other ways to go about MultiDex, all of which can be found here.
Initialize the SDK
Create an Application class in your project.
Instantiate
TT.javain Application class'sonCreate()method.public class MyApplication extends MultiDexApplication {@Overridepublic void onCreate() {super.onCreate();TT.init(getApplicationContext(), "your.application.package");}}
At this point the SDK is initialized and ready to be used. This initialization step has to be executed before taking any actions on the managers.