/Leanplum-Android-CustomTemplates

Custom message templates example for Android

Primary LanguageJava

Leanplum-Android-CustomTemplates

This project illustrates how to define a new message/action template in Leanplum. The samples include a definition of 3-button Confirm message, Slider (Pager) template, and App Review Request. They are available in Java.

Installation

Checkout repository and open with Android Studio. Enter your APP_ID and APP_DEVKEY in App.java file. Run project on emulator or device.

Sync the new message templates to the Dashboard from Messages:
Sync Message templates

Documentation

Full Documentation can be found in Leanplum Docs.

Setup

Once the templates are synced, they will appear in the Campaign Composer under Custom In-App section:
Custom In-App section

3-button Confirm

Composer:
Confirm Composer
Message:
Confirm Message
Results:
Confirm Results
Milestones:
Confirm Milestones

Slider

SliderTemplate class defines a message template containing several slides similar to on-boarding message. Currently due to specifics of Dashboard functionality the slides are hardcoded to 6. If you want to use any of them just add image for that slide from Dashboard. If you need more than 6 you can change the SliderTemplate.MAX_SLIDES constant.

Composer:
Slider Composer
Message:
Slider Message
Milestones:
Slider Milestones

App Review Request

App Rating for Android is implemented using the In-App Review API of the Play Core SDK. Full documentation about the App Review functionality can be found in Leanplum Docs.