Use the User Info object to customize the delivery moment and content of a message.
User Info - Standard can be used to personalise content within messages.
Class container for the user info.
|AdvertisingId||String||Advertising identifier set by the application|
User Info - Custom triggers are set by your mobile app and used to trigger a message when the value set by the mobile app matches the value set in the message through the OpenBack Dashboard or Client API. The values set can also be used as personalised content within messages.
Set a custom trigger value. Value can be
For the trigger index, see Custom Triggers list.
Available since: 2.0.0
OpenBack typically supports up to 10 custom values, if you need more please discuss with OpenBack or email firstname.lastname@example.org
The User Info - Identity is only used when you integrate the OpenBack Client API into your backend systems and want to message a user with that identity.
|Identity1||String||Custom user identifier 1|
|Identity2||String||Custom user identifier 2|
|Identity3||String||Custom user identifier 3|
|Identity4||String||Custom user identifier 4|
|Identity5||String||Custom user identifier 5|
Note on Custom User Identifiers:
Identity is for use with the OpenBack API. If you are not an OpenBack API client, don't use them. Identities are bound to the current OpenBack user, so changing any one of them will reset user and campaign usage. A usage example: when your application has users that can login and logout, you can set one of the Identity to a token used in your system to identify that user. Later on, using the OpenBack API, you can fetch details from that user.
The OpenBack SDK can be used to message users that are subscribed to certain topics. For more information on topics, contact email@example.com
The OpenBack SDK can be used to track events. An event is an action at a particular moment in time for each user, which is then used to target users and personalize content.
To use an event, it must first be created in your App Settings with a unique tag - for example UserSignupComplete, LevelUp, PaymentDetailsIncomplete etc.
Then tag the same event within your app using the code from the triggerEvent section.
For example - to create an event that will send a message 10 minutes after a user runs out of energy, do the following:
Create an event called
EnergyEmptyin the Events Settings section of your App Settings and then in your code put
The OpenBack SDK can be used to track Goals. These can range from anything such as a user completing a signup process, to a user purchasing a product.
Every goal has six components:
Goal Code- This is a unique identifier for each goal.
Goal Name- A name to easily distinguish between each goal.
Goal Description- A short description of what the goal achieves.
Number of Steps- The number of steps required for the goal to be completed. For example, step 1 is a user viewing a product, step 2 is the user adding the product to their cart. Step 3 and goal completion is the user purchasing the product.
Conversion Window- The length of time after a notification is received that it can be attributed to a goal completion.
Default Goal Value- This sets how much the goal completion is worth.
You can find the steps to logging a goal in Android here.
Other Apps Trigger
The Other Apps trigger allows you to send notifications to users based on apps that they currently have installed. The Other Apps trigger for Android can be completely setup and controlled from the OpenBack dashboard. Head to your View Apps and select the app you would like to edit. Select the Other App Settings tab and choose to either search for your app or add it manually.
Manually Adding an Other App
To manually add an Other App, you must first get the package name for the app. If you don't know an app's package name, it can be found on the Google Playstore very easily.
Go to the Playstore page for the app you want and you can find the app package name in the URL after the
id parameter. Just copy everything after
id= in the URL.
Once you have the app package name, head to the Other Apps settings tab of your app and fill out the details. Set the
Other App Label field to the name of the app and then add your package name to the
Other App Package Name field.
The OpenBack Android SDK supports an App Inbox feature which allows users to read messages even after they have dismissed the notification. Your application is in charge of managing and displaying the messages. For more information on implementing this feature in your app, go here.
We recommend that you add all normal permissions that you are comfortable with and only add user prompted permissions if necessary.
These permissions are accepted by a user when the app is installed.
Add the Google Play Services location dependency in your gradle file:
User Prompted Permissions
Starting with Android 6.0, users have to explicitly grant some permissions during runtime, also known as dangerous permissions. Click here for more information.
Custom payload content can be added to messages and then used within your app. Payload content can be any form of text (JSON/CSV/XML/HTML), as long as your app can read it.
To read this content in an activity
onNewIntent(), you can do a
String payload = intent.getStringExtra(OpenBack.OPENBACK_PAYLOAD_EXTRA);
When using Dynamic Push campaigns with a simple message or a URL and the URL cannot be opened by the system, OpenBack brings your application to the foreground when the notification is selected. If the application was already in the foregound, that step is skipped. If your application was in the background, the library launches the last known Activity with
singleTop flag. If your activity overrides
onNewIntent, you can check if it was from the OpenBack library by using:
In-App Video Messages
For using videos in notifications, it is highly recommended to use a URL using HTTPS. In Android 9, HTTP links are automatically blocked and require special permissions to be used.
Clearing A Specific Subdomain (Recommended)
res/xml/network_security_config.xml add the following lines
And then in the application section of your manifest file add the following
Clearing All HTTP Links
Setting up ProGuard rules?
There is no need to set up ProGuard rules regarding the OpenBack SDK. These rules are set in the SDK and are included in your app upon building.
On Android 8+, OpenBack uses JobScheduler with JOB_ID 2700 for the OpenBackService and 2701 for the OpenBackAssetService. If you are using the JobScheduler directly or from a 3rd party SDK, you might have some conflict when using the same JOB_ID. Let us know if it is the case.