Android Features Legacy

User Info

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.

AdvertisingIdStringAdvertising 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.


public final static int CUSTOM_TRIGGER_1
public final static int CUSTOM_TRIGGER_2
public final static int CUSTOM_TRIGGER_3
public final static int CUSTOM_TRIGGER_4
public final static int CUSTOM_TRIGGER_5
public final static int CUSTOM_TRIGGER_6
public final static int CUSTOM_TRIGGER_7
public final static int CUSTOM_TRIGGER_8
public final static int CUSTOM_TRIGGER_9
public final static int CUSTOM_TRIGGER_10


public static void setCustomTrigger(Context context, int triggerIndex, String value)
public static void setCustomTrigger(Context context, int triggerIndex, int value)
public static void setCustomTrigger(Context context, int triggerIndex, float value)

Set a custom trigger value. Value can be String, int or float.
For the trigger index, see Custom Triggers list.


OpenBack.setCustomTrigger(getApplicationContext(), OpenBack.CUSTOM_TRIGGER_1, "StringTest");
OpenBack.setCustomTrigger(getApplicationContext(), OpenBack.CUSTOM_TRIGGER_2, 42);
OpenBack.setCustomTrigger(getApplicationContext(), OpenBack.CUSTOM_TRIGGER_3, 1.12);

Available since: 2.0.0

OpenBack typically supports up to 10 custom values, if you need more please discuss with OpenBack or email


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.

Identity1StringCustom user identifier 1
Identity2StringCustom user identifier 2
Identity3StringCustom user identifier 3
Identity4StringCustom user identifier 4
Identity5StringCustom 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

Custom Events

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

OpenBack.triggerEvent(getApplicationContext(), "EnergyEmpty", 600);


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.

Grabbing the Package Name

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.

Setting Package Name

App Inbox

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.

Optional Permissions

We recommend that you add all normal permissions that you are comfortable with and only add user prompted permissions if necessary.

Normal Permissions

These permissions are accepted by a user when the app is installed.

Activity Permissions

<uses-permission android:name="" />

Add the Google Play Services location dependency in your gradle file:

dependencies {
implementation ""

Bluetooth Permissions

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-feature android:name="android.hardware.bluetooth" android:required="false" />

Unlock Permissions

<receiver android:name="com.openback.OpenBackReceiver" android:exported="true">
<action android:name="android.intent.action.USER_PRESENT" />

Aeroplane Permissions

<receiver android:name="com.openback.OpenBackReceiver" android:exported="true">
<action android:name="android.intent.action.AIRPLANE_MODE" />

Connectivity Permissions

<receiver android:name="com.openback.OpenBackReceiver" android:exported="true">
<action android:name="" />
<action android:name="" />

Battery Permissions

<receiver android:name="com.openback.OpenBackReceiver" android:exported="true">
<action android:name="android.intent.action.BATTERY_LOW" />
<action android:name="android.intent.action.BATTERY_OKAY" />
<action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />

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.

Location Permissions

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-feature android:name="" android:required="false"/>

Phone Permissions

<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-feature android:name="android.hardware.telephony.gsm" android:required="false" />
<uses-feature android:name="android.hardware.telephony.cdma" android:required="false" />
<receiver android:name="com.openback.OpenBackReceiver" android:exported="true">
<action android:name="android.intent.action.PHONE_STATE" />

Noise Permissions

<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-feature android:name="android.hardware.microphone" android:required="false" />


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 onCreate() and onNewIntent(), you can do a String payload = intent.getStringExtra(OpenBack.OPENBACK_PAYLOAD_EXTRA);

Handling onNewIntent

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:

protected void onNewIntent(Intent intent) {
if(intent.getBooleanExtra(OpenBack.OPENBACK_TO_FRONT_EXTRA, false)) {
// OpenBack trying to bring your app in the foreground - maybe skip doing a major refresh

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)

In your res/xml/network_security_config.xml add the following lines

<?xml version="1.0" encoding="utf-8"?>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true"></domain>

And then in the application section of your manifest file add the following

<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
<uses-permission android:name="android.permission.INTERNET" />

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.

External Dependencies

Required dependencies:

implementation ""
implementation ""
implementation ""
implementation ""
implementation ""
implementation ""

Optional dependencies:

implementation ""
implementation ""


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.