Skip to content

Notification Permission

Since Android 13 (API 33), apps must ask the user for the POST_NOTIFICATIONS runtime permission before showing notifications. On older versions the permission is granted automatically.

The Pulsate SDK already declares the permission in its manifest:

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

Use the Activity Result API:

class MainFragment : Fragment() {
private val requestPermissions =
registerForActivityResult(ActivityResultContracts.RequestMultiplePermissions()) { results ->
// results[Manifest.permission.POST_NOTIFICATIONS] == true when granted
}
private fun checkAndRequestPushPermission() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
val granted = ContextCompat.checkSelfPermission(
requireContext(),
Manifest.permission.POST_NOTIFICATIONS,
) == PackageManager.PERMISSION_GRANTED
if (!granted) {
requestPermissions.launch(arrayOf(Manifest.permission.POST_NOTIFICATIONS))
}
}
}
}

You get one automatic system prompt — make it count:

  1. Prime first. Show a short screen explaining why notifications are useful before triggering the system dialog. Google may also ask for a priming screen during app review.
  2. Ask in context. Request the permission when the user reaches a feature that benefits from it (order updates, new-message alerts), not on first launch.
  3. Ask incrementally. Request permissions one at a time as features become relevant.
  4. Remind strategically. If the user declines, wait several days or sessions before showing your own reminder that links to system settings.
  5. Ride positive moments. Ask right after a success — completed purchase, earned reward, finished onboarding.
  6. Explain data handling. Users grant more when they understand what you do (and don’t do) with the channel.