Push

Android 13 Notification Permission (POST_NOTIFICATIONS): How to Ask and Handle Denial

9:41

Since Android 13, a newly installed app can't show notifications until the user allows it. If your push notifications work on older phones but never appear on new ones, this permission is usually why. Here's how it works, when to ask, and what to do when people say no.

What changed in Android 13

  • Notifications became a runtime permission: android.permission.POST_NOTIFICATIONS.
  • New installs on Android 13+ start with notifications off until the user taps Allow.
  • Apps that already had notifications on before the phone updated to Android 13 usually keep them, so the problem shows up mostly with new users.
  • Android 12 and lower are unaffected: the permission is granted at install time and the check simply returns true.

1. Declare the permission

Target API 33 or higher and add the permission to your manifest. Without the manifest entry the dialog never appears, no matter how you request it.

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

2. Ask at the right moment

You only get a couple of chances: after two denials Android stops showing the dialog. So don't ask on the first screen. Ask right after the user does something a notification would help with, and tell them what they'll get, for example "We'll let you know when your order ships." A short screen of your own before the system dialog, with a clear reason, gets noticeably more people to allow it.

3. Request it in Kotlin

private val askNotifications =
    registerForActivityResult(ActivityResultContracts.RequestPermission()) { granted ->
        if (!granted) showWhyNotificationsHelp()
    }

fun maybeAskForNotifications() {
    if (Build.VERSION.SDK_INT < 33) return // granted at install on Android 12 and lower
    val granted = ContextCompat.checkSelfPermission(
        this, Manifest.permission.POST_NOTIFICATIONS
    ) == PackageManager.PERMISSION_GRANTED
    when {
        granted -> Unit
        shouldShowRequestPermissionRationale(Manifest.permission.POST_NOTIFICATIONS) ->
            showWhyNotificationsHelp() // explain, then call askNotifications.launch(...)
        else -> askNotifications.launch(Manifest.permission.POST_NOTIFICATIONS)
    }
}

shouldShowRequestPermissionRationale() returns true after the user has denied once. That's your cue to explain why notifications are useful before asking a second, and final, time.

4. React Native

import { PermissionsAndroid, Platform } from "react-native";

export async function askForNotifications() {
  if (Platform.OS !== "android" || Platform.Version < 33) return true;
  const result = await PermissionsAndroid.request(
    PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS
  );
  return result === PermissionsAndroid.RESULTS.GRANTED;
}

Call it from the screen where the permission makes sense, not on app start. The full push setup is in the React Native push notifications guide.

5. Flutter

Recent versions of firebase_messaging show the Android 13 dialog from the same requestPermission() call you use for iOS:

final settings = await FirebaseMessaging.instance.requestPermission();
final allowed =
    settings.authorizationStatus == AuthorizationStatus.authorized ||
    settings.authorizationStatus == AuthorizationStatus.provisional;

If notifications still don't show in the background after permission is granted, work through Flutter push notifications not received in background.

6. Handle "Don't allow"

Once the permission is permanently denied, requesting it again does nothing. Show a small banner or settings row instead, and send the user straight to your app's notification settings:

// Open this app's notification settings (Android 8+)
val intent = Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS).apply {
    putExtra(Settings.EXTRA_APP_PACKAGE, packageName)
}
startActivity(intent)

Check the state again when the user comes back to the app. Users can also turn notifications off later from Settings without your app ever being asked, so check NotificationManagerCompat.from(context).areNotificationsEnabled() before relying on push for anything important.

7. Test both paths

You don't need to reinstall the app to reset the permission. Use adb:

# Remove the permission to test the "not granted" path
adb shell pm revoke com.example.app android.permission.POST_NOTIFICATIONS

# Grant it again
adb shell pm grant com.example.app android.permission.POST_NOTIFICATIONS

# Start completely fresh, as a new install would
adb shell pm clear com.example.app

Measure your opt-in rate

If only half your Android users allow notifications, every campaign reaches half the audience you think it does. notifySphere shows subscribers, monthly active users and delivery for every campaign, so you can see how many devices can actually receive a push. To build and test a payload by hand, try the free FCM payload builder or push notification preview.

Frequently asked questions

What is the POST_NOTIFICATIONS permission?

It's the runtime permission Android 13 (API level 33) added for showing notifications. Before Android 13 apps could post notifications by default; now a newly installed app needs the user to tap Allow first.

Do I still get an FCM token if the user denies notifications?

Yes. Firebase Cloud Messaging still issues a token and delivers messages to the device. The system just won't display notification messages, so the user never sees them. Data-only messages still reach your app's handler.

What happens if my app targets Android 12 or lower?

On an Android 13 device the system asks on your behalf, typically when your app creates its first notification channel. You lose control over when the dialog appears, so target API 33 or higher and ask at a moment you choose.

Why doesn't the permission dialog show any more?

After the user denies it twice, Android stops showing the dialog and the request returns denied immediately. From then on, the only way to turn notifications on is the app's notification settings, so link the user there with a short explanation.

When is the best time to ask for notification permission?

When the user has just done something that a notification would help with, such as placing an order, booking a slot or following a topic. Asking on the very first screen, before the user knows what the app does, gets far more denials.