Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis
gradle/wrapper
predictsdk
.gitignore
.travis.yml
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
lint.xml
secring.gpg.enc
settings.gradle

README.md

Emarsys Predict SDK for Android

Coverage Status

Overview

This document describes the Emarsys Predict SDK for the Android platform. It is intended for Android mobile app developers who want to integrate Emarsys Web Extend or Predict Recommendations into native mobile app. The document describes the main Emarsys Predict Android SDK interface functions.

Install

Minimum supported version is minSdkVersion 15

repositories {
    jcenter()
}

and

compile 'com.scarabresearch:predictsdk:+'
  • Implement data collection in the application
  • Implement recommendations

Getting started

The semantics of each SDK function is documented in our JavaScript API. There are some fundamental differences between the Javascript API and the Android SDK:

  • Session Initialization You should call Session.initialize method with a Storage interface implementation in the application entry point.

  • Storage Needs to implement two methods (sample code uses Android's SharedPreferences).

  • Click tracking: You should instantiate Transaction object with the Transaction(Item item) constructor, if the user selects a recommended item.

  • Rendering recommendations: We recommend to use a ListView or a RecyclerView for displaying the recommendations, and append/make the results from the recommendation to the data source, then reload the data to it.

You may use Live Events (Emarsys > Admin > Data Sources) to filter for events coming from Android devices for development/debugging purposes.

The Javascript API documentation lives here:

Sample Code

We also created example applications for you to make it easier to implement Emarsys Predict SDK in your e-commerce application. The samples an be found in this repository.

We <3 open source software, that’s why we open sourced our Emarsys Predict SDK for Android implementation. That way you can be confident that the library what you include contains only the code necessary to deliver awesome recommendations and also manage the data collection. You can find the repository here.

SDK Development

The following tasks may be useful during SDK development.

Deploy to Maven Local

$ ./gradlew install

Run Tests

$ ./gradlew cAT -i

Generate JavaDoc

$ ./gradlew javaDoc
You can’t perform that action at this time.