Before asking users for permissions we recommend you show them a Priming screen or message that explains why this permission is needed and what it will be used for. Priming screens can help increase opt in rates. Google might also ask you to add a priming screen or popup during the App review process.

Push notifications

Before Android Tiramisu (API 33) push notification permission was granted by default, with the release of Android Tiramisu (API 33) that is no longer the case. To be able to send pushes to the user he must accept the POST_NOTIFICATIONS permission.

Here is a code example of how to request this permission.

<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
private val requestMultiplePermissions = registerForActivityResult(RequestMultiplePermissions()) { }

private fun checkAndRequestPushPermission() {
  val listPermissionsNeeded: MutableList<String> = ArrayList()  
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
    val pushPermission = ContextCompat.checkSelfPermission(
      requireContext(),
      Manifest.permission.POST_NOTIFICATIONS,
    )
    if (pushPermission != PackageManager.PERMISSION_GRANTED) {
      listPermissionsNeeded.add(Manifest.permission.POST_NOTIFICATIONS)
    }
  }
  if (listPermissionsNeeded.isNotEmpty()) {
    requestMultiplePermissions.launch(listPermissionsNeeded.toTypedArray())
  }
}

Location Permissions

Over the last few years Android has changed how location permissions are granted multiple times. We have decided to write a whole separate section about location permissions for different Android versions. Please read the links below.
https://docs.pulsatehq.com/v2.8.2/reference/android-permissions
https://docs.pulsatehq.com/v2.8.2/reference/google-location-permission-process

Bluetooth Permissions

These permissions are required to be able to use beacons. These permissions were introduced in Android 12 - BLUETOOTH_SCAN and BLUETOOTH_CONNECT.

Here is a code example of how to request this permission.

<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
private val requestMultiplePermissions = registerForActivityResult(RequestMultiplePermissions()) { }

private fun checkAndRequestPermissions(): Boolean {
    val listPermissionsNeeded: MutableList<String> = ArrayList()
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
  	    val blePermission = ContextCompat.checkSelfPermission(
    		    requireContext(),
            Manifest.permission.BLUETOOTH_SCAN
        )
        val bleConnectPermission = ContextCompat.checkSelfPermission(
            requireContext(),
            Manifest.permission.BLUETOOTH_CONNECT
        )
        if (blePermission != PackageManager.PERMISSION_GRANTED) {
            listPermissionsNeeded.add(Manifest.permission.BLUETOOTH_SCAN)
        }
        if (bleConnectPermission != PackageManager.PERMISSION_GRANTED) {
           listPermissionsNeeded.add(Manifest.permission.BLUETOOTH_CONNECT)
        }
    }

    if (listPermissionsNeeded.isNotEmpty()) {
        requestMultiplePermissions.launch(listPermissionsNeeded.toTypedArray())
        return false
    }
  	return true
}

Improving opt in rates

There are plenty of studies online that talk about how to increase opt in rates for permissions we will list some of their recommendations below

  1. Optimal Timing for Permission Requests
    Asking for permissions at the right moment can significantly impact opt-in rates. This means not requesting permissions immediately upon the first app launch but rather waiting until the user encounters a feature that requires the permission.
  2. Incremental Permission Requests
    Gradually requesting permissions as they become relevant or the user uses your App more, rather than asking for all permissions upfront.
  3. Use of Priming Screens
    Explain why a permission is needed before the system prompt appears can increase opt-in rates. This pre-emptive explanation helps set expectations and build trust.
  4. Permission Reminders
    For users who initially decline to grant permissions, implementing a thoughtful reminder strategy can be effective. This might involve waiting a specific amount of days or logins to allow the user to engage more with your App before asking for the permission again.
  5. Educating Users
    Providing educational content on how data and permissions are handled, ensuring privacy, and clarifying the benefits can also improve opt-in rates. This is especially effective when users are cautious about sharing their data.
  6. Asking After Positive Interactions
    Asking for permissions after a user has a positive interaction with the app (e.g., after achieving a milestone, completing a task, or receiving a reward) can increase the likelihood of consent.