Configuring Growth Action Push UI Directly [Android]
Follow
Get Started
This guide provides instructions for directly configuring the Growth Action Push UI.
Push Basic Integration and Configuration
Before configuring the push UI directly, the basic integration and settings for sending push notifications must be completed.
Please proceed with the basic integration and settings by referring to the guide below.
[[Quote: Guide: Normal]]
Unless you configure the push UI yourself!!!
If you would like to use the template provided by DFINERY without configuring the Push UI yourself, please refer to the guide in the link above rather than this guide.
Parsing push data
You can obtain a modeled defined push payload by passing the push payload received through the push receiver configured in the app to the SDKs parsePushData API.
ParsePushData API
This API inspects the delivered payload and returns the data converted to AdBrixRm.AbxRemotePushModel.
The sample code below shows how to obtain a growth action push payload using the ParsePushData API within Firebases push reception receiver function.
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
try {
AdBrixRm.AbxRemotePushModel pushModel = AdBrixRm.parsePushData(remoteMessage);
} catch (JSONException e) {
e.printStackTrace();
}
}
[[Quote:Guide:Normal]]
Please note!
A JSON exception will occur if the payload sent to the API is not a push from the definer.
If the bundle key in the payload sent to the API does not start with abx:gf:fcm, all information in the AbxRemotePushModel will come through empty. Therefore, when a JSONException does not occur, please make sure to check and use the contents of the pushModel at the final use.
Push Payload Model Definition
The items of the push payload model are as follows.
Item | explanation | Note |
---|---|---|
title | This is the title of a general push. | |
body | This is the message content of a general push. | |
bigTextTitle | This is the title of the Rich Push. | |
bigTextBody | This is the message content of Rich Push. | |
summaryText | This is a summary of the message from Rich Push. | |
imageUrl | Here is the image URL of Rich Push. | |
largeIconUrl | This is the large icon image URL for Rich Push. | |
genWhileRun | Whether push is exposed during app execution. | |
genVibe | Whether to vibrate when receiving a push. | |
genSound | Whether to play sound when receiving a push. | |
campaignId | This is the Growth Action Push Campaign ID. | |
campaignRevisionNo | This is the revision number of the growth scenario. | |
stepId | This is the step ID of the growth scenario. | |
cycleTime | It is the cycle time of the growth scenario. | |
deeplinkUrl | This is the deep link URL set in the push campaign. |
Push Payload Model Sample
This is sample data for the push payload model.You can pre-configure the look and feel using the data below.
AbxRemotePushModel{
title='default-title',
body='default-body',
bigTextTitle='123456789 123456789 123456789',
bigTextBody='<html><body><p>Text</p><p style="color:red;">Red</p><p style="color:blue;">Blue</p><p style="font-size:50px;">Size</p></body></html>',
summaryText='summaryText',
imageUrl='https://c.files.bbci.co.uk/12A9B/production/_111434467_gettyimages-1143489763.jpg',
largeIconUrl='Url',
campaignId='12345',
campaignRevisionNo=2,
stepId='b2',
cycleTime='2019092008',
deeplinkUrl='scheme://host?key=value'
}
Push Open Event Analysis
If you configure the push UI yourself, you must forward the push open event to the DFINERY.
At the moment the user clicks the push, the openPush API is called as follows.
try {
AdBrixRm.AbxRemotePushModel abxRemotePushModel = AdBrixRm.parsePushData(remoteMessage);
Log.d("logtag", abxRemotePushModel.toString());
AdBrixRm.openPush(abxRemotePushModel);
}
[[Quote:Risk:Moderate]]
Be careful!!!
If the openPush API is not properly integrated, you may not be able to check reports such as push open rates.