Newest version of the SDK is regularly uploaded to both Maven Central and JCenter. You can add the SDK to your
Android project by including the following dependency in your pom.xml
:
<dependency>
<groupId>com.scarabresearch</groupId>
<artifactId>predictsdk</artifactId>
<version>1.0.0</version>
</dependency>
or if you are using Gradle:
compile 'com.scarabresearch:predictsdk:1.0.1'
You can find the generated Javadoc here
There is a demo application showing how to use the various SDK features. In order to build it, first download the source code from GitHub:
git clone https://github.com/scarabresearch/EmarsysMobileSamplesAndroid.git
You can build the demo application either from Android Studio (at least version 2) or directly using Gradle. In the former case, simply open the project and select Run 'app' from the Run menu. In the latter, issue the following command:
gradlew assembleRelease
(assuming that the sdk.dir
property in the file local.properties
is set correctly).
The apk
file is generated in the app/build/outputs/apk
directory. To install it into
a device connected via USB, run
adb -d install <apk-file>
where <apk-file> is the path to the generated apk
file.
Download the source code from the GitHub repository:
git clone https://github.com/scarabresearch/EmarsysPredictSDKAndroid.git
You can build the SDK from Android Studio (using version 2 or later) by opening the project, and then selecting
Make Project from the Build menu. The generated aar
file is placed in the
predictsdk/build/output/aar
directory, and the jar
file in
predictsdk/build/libs
.
When using Gradle, issue the following command:
gradlew build
(assuming that the sdk.dir
property in the file local.properties
is set correctly). The
generated aar
file is placed in the predictsdk/build/output/aar
directory, and the
jar
file in predictsdk/build/libs
.