Privacy

    Android notification listener service security

    A 2026 view of an Android notification listener reading all notifications including a one-time code, contrasted with posting notifications that keep sensitive content out and hide it on the lock screen

    An Android app with notification access can read every notification on the device, from every app, and notifications routinely carry sensitive content: message previews, one-time codes, banking alerts. That makes a NotificationListenerService one of the most privacy-sensitive capabilities on the platform, which is why the access is granted through a special settings screen with a warning rather than a routine prompt. There are two sides for a developer. If your app posts notifications, anything sensitive in them can be read by a listener app. If your app is a listener, you hold an extraordinary amount of trust. Here is how notification access works and how to handle both sides.

    Short answer

    A NotificationListenerService lets an app read, and act on, all notifications posted on the device, which often contain sensitive content like message previews and one-time codes. Per Android, this requires the user to grant notification access through a special settings screen, not a routine runtime permission, reflecting how powerful it is. The two implications: if your app posts notifications, keep highly sensitive content, such as full one-time codes, out of them and use appropriate lock-screen visibility, since a listener app can read them; and if your app uses notification access, it is a serious responsibility under Google Play's restricted policy, so request it only for a genuine core feature and never harvest or transmit notification content. Notifications are a shared, readable surface, so treat them accordingly.

    What you should know

    • A notification listener reads all notifications: from every app on the device.
    • Notifications often carry sensitive content: previews, one-time codes, alerts.
    • Access is granted via a special settings screen: not a routine permission.
    • Posting side: keep sensitive content out of notifications you post.
    • Listening side: a serious responsibility under restricted Play policy.

    What does notification access expose?

    The full stream of notifications and their content. The table summarizes.

    AspectDetail
    ScopeAll notifications, from all apps on the device
    ContentTitles, text, and data the notifications carry
    Sensitive dataMessage previews, one-time codes, financial alerts
    GrantingA special settings screen with a warning
    Play policyNotification access is restricted and reviewed

    A NotificationListenerService receives the notifications posted on the device, across all apps, including their content, and can also act on them, such as dismissing them. Because notifications frequently include sensitive information, a message preview, a two-factor code, a transaction alert, an app with notification access is positioned to see a broad and sensitive slice of what happens on the device. Android treats this seriously: the access is not a normal runtime permission but is granted through a dedicated settings screen where the user explicitly enables notification access for the app, with a warning about what it allows. Google Play also restricts which apps may use notification access, tying it to genuine core functionality and reviewing it. So notification access is gated and high-trust precisely because the notification stream is a rich, cross-app, often-sensitive data source.

    What are the two sides for a developer?

    Posting notifications, and reading them. If your app posts notifications, the relevant fact is that any app the user has granted notification access can read your notifications' content, so a notification is not a private channel to your user; it is visible to listener apps and, depending on settings, on the lock screen. That means you should keep highly sensitive content out of notification text, never put a full one-time code or sensitive personal or financial detail directly in a notification, and use appropriate visibility so sensitive notifications are not fully shown on the lock screen. If your app is the listener, using notification access, you take on an extraordinary responsibility: you can see all of the user's notifications, so you must request notification access only for a genuine, disclosed core feature, such as a companion or accessibility function, never harvest or transmit notification content beyond what that feature requires, and comply with Google Play's restricted policy for notification access. Misusing it, for example to capture one-time codes or message content, is both a severe breach of trust and a policy violation. The two sides share one truth: the notification stream is sensitive and broadly readable.

    How do you handle it?

    Minimize sensitive content you post, and use notification access only narrowly if at all. On the posting side, design notifications assuming they can be read by a listener app and seen on the lock screen: keep sensitive details out of the visible content, avoid putting full one-time codes or confidential data in a notification, and set notification visibility so sensitive content is hidden on the lock screen, showing a generic message instead. Treat a notification as a public-ish surface, not a confidential message to the user. On the listening side, do not request notification access unless your app has a genuine core function that needs it and you can justify it under Google Play's policy; if you do, handle the notifications you read minimally, never logging or transmitting their content beyond the disclosed purpose, applying least privilege and full transparency. Most apps should not be notification listeners at all. The principle is that because the notification stream is a sensitive, cross-app, readable surface, you keep your own sensitive data out of notifications and treat reading others' notifications as a rare, high-trust capability used only for a real, disclosed purpose.

    What to watch out for

    The first trap, on the posting side, is putting sensitive content, like a full one-time code or personal details, directly in a notification, where a listener app can read it and it may show on the lock screen; minimize content and set visibility. The second, on the listening side, is requesting notification access without a genuine core need or mishandling the notifications you read, which violates trust and Google Play policy. The third is treating notifications as a private channel, when they are broadly readable. Notification posting and access are configured in your app, so a pre-submission scan such as PTKD.com (https://ptkd.com), which reads the compiled APK or AAB against OWASP MASVS, surfaces your permissions and data handling, while keeping sensitive content out of notifications and using access narrowly are yours to implement.

    What to take away

    • A NotificationListenerService lets an app read all notifications on the device, which often carry sensitive content, so the access is granted through a special settings screen and restricted by Google Play.
    • If your app posts notifications, keep highly sensitive content like full one-time codes out of them and set lock-screen visibility, since listener apps can read them and they may show when locked.
    • If your app uses notification access, treat it as a rare, high-trust capability for a genuine core feature only, never harvesting notification content, and comply with Google Play's policy.
    • Use a pre-submission scan such as PTKD.com to surface your permissions and data handling, and minimize sensitive notification content in your app.
    • #android
    • #notification-listener
    • #notifications
    • #privacy
    • #one-time-codes
    • #owasp-masvs
    • #app-security

    Frequently asked questions

    What can an app with notification access do?
    A NotificationListenerService receives all notifications posted on the device, across every app, including their content, and can also act on them, such as dismissing them. Because notifications frequently carry sensitive information, message previews, two-factor codes, transaction alerts, an app with notification access can see a broad and sensitive slice of what happens on the device. That is why the access is granted through a dedicated settings screen with a warning rather than a routine runtime permission, and why Google Play restricts which apps may use it to genuine core functionality.
    Can another app read my app's notifications?
    Yes. Any app the user has granted notification access can read the content of your notifications, so a notification is not a private channel to your user; it is visible to listener apps and, depending on settings, on the lock screen. That means you should keep highly sensitive content out of notification text, never putting a full one-time code or sensitive personal or financial detail directly in a notification, and set notification visibility so sensitive notifications are not fully shown on the lock screen. Treat a notification as a broadly readable surface, not a confidential message.
    Should my app use a NotificationListenerService?
    Only if it has a genuine core function that needs it, such as a companion or accessibility feature, and you can justify it under Google Play's restricted policy. Notification access lets you see all of the user's notifications, an extraordinary amount of trust, so most apps should not use it at all. If you do, handle the notifications minimally, never logging or transmitting their content beyond the disclosed purpose, apply least privilege, and be transparent. Misusing it to capture one-time codes or message content is a severe breach of trust and a policy violation.
    How do I keep sensitive data out of notifications?
    Design notifications assuming they can be read by a listener app and seen on the lock screen. Keep sensitive details out of the visible content, do not put full one-time codes or confidential personal or financial data directly in a notification, and set notification visibility so sensitive content is hidden on the lock screen, showing a generic message instead and revealing details only after the device is authenticated. Treat a notification as a public-ish surface rather than a private message, so that even a listener app or a glance at the locked device does not expose anything sensitive.
    Can a scan help with notification security?
    Notification posting and access are configured in your app, the content and visibility you set when posting, and the access you request if you are a listener, so the implementation is yours. A pre-submission scan such as PTKD.com reads the compiled APK or AAB against OWASP MASVS and surfaces your permissions and data handling, which helps you see whether your app requests notification access and assess how it handles data. The specific practices, keeping sensitive content out of notifications and using notification access only narrowly, are implemented in your app and reviewed against the scan.

    Keep reading

    Scan your app in minutes

    Upload an APK, AAB, or IPA. PTKD returns an OWASP-aligned report with copy-paste fixes.

    Try PTKD free