Android Signals

The OpenBack SDK library comes with a set of basic features and permissions (see Library Manifest for the complete listing). Your application might need some extra permissions depending on the message signals used.

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, and as such we recommend that you include them all.

Unlock Signal

The Unlock Signal is used to message users while their is unlocked/locked. It is an extremely powerful Signal and we highly recommend including it.

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

Aeroplane Signal

The Aeroplane Signal delivers notifications based on whether or not aeroplane mode is enabled on the device.

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

Activity Signal

The Activity Signal is used to deliver messages based on an activity the user is performing such as walking, running, cycling or in a vehicle.

<!-- Required for 28 and below. -->
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
<!-- Required for 29+. -->
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />

Add the Google Play Service location library dependency in your application build.gradle:

dependencies {
implementation "com.google.android.gms:play-services-location:17.0.1"
}

Headphone Signal

The Headphone Signal is used to deliver a notification based on whether the user is using headphones or not.

If your are targeting devices with Android 5.1 (Lollipop / level 22) or lower, you have to add the following permission:

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

Bluetooth Signal

Deliver notifications based on bluetooth.

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

Connectivity Signal

The Connectivity Signal delivers notifications based on WiFi, data connection or GPS settings.

<receiver android:name="com.openback.OpenBackReceiver" android:exported="true">
<intent-filter>
...
<action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
...
</intent-filter>
</receiver>

Power Signal

The Power Signal can be used to deliver messages based on a user's battery level/charging status.

<receiver android:name="com.openback.OpenBackReceiver" android:exported="true">
<intent-filter>
...
<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" />
...
</intent-filter>
</receiver>

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 Signal

The Location Signal is used to target users based on their location. You can add these permissions to target users using their exact location.

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- Required for Android 10 (API level 29) for background location -->
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_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.hardware.location.network" android:required="false"/>

Phone Signal

The Phone Signal is used to target users based on their device or mobile operator.

<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">
<intent-filter>
...
<action android:name="android.intent.action.PHONE_STATE" />
...
</intent-filter>
</receiver>

Noise Signal

The Noise Signal is used to target users based on the noise level of their surroundings.

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