Getting Started with the Android SDK Example App

The Android SDK Example App is a sample implementation of the Monetate Android SDK. The app compiles a list of events that are then sent to the Engine API to update the UI based on the actions the Engine API returns. You can use this source code either as a reference for your own app or as an inclusion in your own source to aid development.

App Setup and Execution

Submit a support ticket using the Kibo Technical Support portal to obtain the app. To set it up, open the project in Android Studio.

To run the app, click Run. A simulation of the app appears.

Using the App

The example app simulates a storefront. You can trigger various events within the app by performing actions within the app. Events and their responses are recorded in the log within Android Studio.

The following events are automatically triggered upon app startup:

UserAgentIndicates the user-agent header from the client originating the request.
IpAddressIndicates the IP address of the visitor.
ScreenSizeIndicates the visitor's screen size (height and width) in pixels.

In addition to the above events, the following events are triggered upon taking various actions within the app:

PageViewIndicates a page view event.
DecisionRequestIndicates an event for a decisioning request.
ProductDetailViewIndicates a view event for product details.
CartIndicates a cart view event and the contents of a card.
PurchaseIndicates a purchase event and the order details.

Reusing Example App Code in Your App

Once you import the SDK into your app, you can include the following code to set up a new instance:

Account account = new Account("", "a-701b337c", "p","localhost");
User user = new User();
ContextMap contextMap = new ContextMap();
KiboPersonalization kiboPersonalization = new KiboPersonalization(user,account,contextMap);
IpAddress address = new IpAddress();
address.setIpAddress("");, address);

Change the user, account, and contextMap attributes to customize this instance to your app.

For a complete list of methods and objects you can use, refer to the SDK API Reference.