The ONS Android SDK allows you to build meaningful communication experience in your Android app through highly personalized push notifications & In-App messages.
Our 📕 setup documentation details the steps to take for an easy and successful integration.
The ONS Android SDK requires Android 5.0 (Lollipop / API Level 21).
- Setup guide: start your implementation here!
- Help center: answers to most questions you may have during the integration
- API reference: this documents each of the classes and methods in the ONS Android SDK
You may also find this guide useful to review after integration to make sure you're ready to go live: How can I test the integration on Android?
ONS is available in Maven Central
You can also integrate the ONS Android SDK manually by downloading the .aar
.
Build instructions are detailed in BUILDING.md.
Please refer to our contributing guidelines.
The ONS Android SDK reports various tracking events to the server. These events are grouped by the service that reports them. Below is a list of all tracking events, grouped by each service, along with sample payloads and details about when the events are triggered.
START
STOP
OPEN_FROM_PUSH
MESSAGING
LOCAL_CAMPAIGN_VIEWED
NATIVE_DATA_CHANGED
INSTALL_DATA_CHANGED
PROFILE_DATA_CHANGED
INSTALL_DATA_CHANGED_TRACK_FAILURE
LOCATION_CHANGED
NOTIFICATION_STATUS_CHANGE
INBOX_MARK_AS_READ
INBOX_MARK_AS_DELETED
INBOX_MARK_ALL_AS_READ
OPT_IN
OPT_OUT
OPT_OUT_AND_WIPE_DATA
PROFILE_IDENTIFY
FIND_MY_INSTALLATION
{
"id": "event_id",
"date": "2023-01-01T00:00:00Z",
"name": "START",
"params": {
"key": "value"
},
"session": "session_id",
"ts": 1234567890
}
START
: Triggered when the SDK is started.STOP
: Triggered when the SDK is stopped.OPEN_FROM_PUSH
: Triggered when the app is opened from a push notification.MESSAGING
: Triggered when a messaging event occurs.LOCAL_CAMPAIGN_VIEWED
: Triggered when a local campaign is viewed.NATIVE_DATA_CHANGED
: Triggered when native data changes.INSTALL_DATA_CHANGED
: Triggered when install data changes.PROFILE_DATA_CHANGED
: Triggered when profile data changes.INSTALL_DATA_CHANGED_TRACK_FAILURE
: Triggered when tracking install data changes fails.LOCATION_CHANGED
: Triggered when the location changes.NOTIFICATION_STATUS_CHANGE
: Triggered when the notification status changes.INBOX_MARK_AS_READ
: Triggered when an inbox message is marked as read.INBOX_MARK_AS_DELETED
: Triggered when an inbox message is marked as deleted.INBOX_MARK_ALL_AS_READ
: Triggered when all inbox messages are marked as read.OPT_IN
: Triggered when the user opts in.OPT_OUT
: Triggered when the user opts out.OPT_OUT_AND_WIPE_DATA
: Triggered when the user opts out and wipes data.PROFILE_IDENTIFY
: Triggered when the user profile is identified.FIND_MY_INSTALLATION
: Triggered when the find my installation event occurs.
START
{
"id": "event_id",
"date": "2023-01-01T00:00:00Z",
"name": "START",
"params": {
"key": "value"
},
"session": "session_id",
"ts": 1234567890
}
START
: Triggered when the SDK is started.
PUSH
{
"id": "event_id",
"date": "2023-01-01T00:00:00Z",
"name": "PUSH",
"params": {
"key": "value"
},
"session": "session_id",
"ts": 1234567890
}
PUSH
: Triggered when a push notification is sent.
ATTRIBUTES_SEND
{
"id": "event_id",
"date": "2023-01-01T00:00:00Z",
"name": "ATTRIBUTES_SEND",
"params": {
"key": "value"
},
"session": "session_id",
"ts": 1234567890
}
ATTRIBUTES_SEND
: Triggered when user attributes are sent.