What Is Notification Text Redaction? (App Privacy)
Notification text redaction means replacing sensitive notification details with neutral text on a locked screen, while keeping the details inside the authenticated app. Android supports a redacted public version; iOS preview visibility is controlled by the user. In both systems, safe design starts with not putting secrets in alert text and then testing every place notifications may appear.
A private alert can help protect messages, account details, and one-time codes from people who can see a device screen. This gives users more control and may ease privacy concerns, though notification redaction is not a medical safeguard or a guarantee of secrecy.
I treat it as a data-handling task, not a cosmetic screen setting. Changing the lock-screen display does not remove sensitive text from the original push payload or every place the device may store or show it. The steps below explain how to choose safe text, configure platform behavior, and test the full path.
Plan Data Classification and Redaction
Data classification means deciding which notification details are safe to show before choosing how to hide the rest. List each notification type and mark its title, body, and other fields as public or sensitive. Then write a useful generic version for anything that should stay private.
Start with an inventory, not a code change. Include message previews, payment alerts, security warnings, and sign-in codes. A person’s name, account balance, message excerpt, or one-time code can reveal private information even when the app name itself seems harmless.
Use a simple rule: if someone could misuse or infer private information from a lock-screen glance, treat the field as sensitive. The safe version should still tell the user what to do, without exposing the detail.
For example, “New activity” and “Open the app to view” give context without naming a sender or quoting a message. Avoid vague alerts that users may ignore, but do not make the text so specific that it reveals the secret.
Before implementation, check supported operating-system versions and how existing notification categories or Android channels behave. Keep the inventory with the app’s privacy requirements so later changes do not accidentally reintroduce sensitive content.
Check OS Controls and Notification Surfaces
Operating-system controls decide how much of a notification appears on a device, and users may change those controls. App code cannot reliably override their choices. Check lock-screen settings, notification history, and paired-device behavior, because a notification can appear in more places than the phone’s main lock screen.
On iOS, users control notification previews through system settings. Depending on their choice, previews may always show, appear only when the device is unlocked, or stay hidden. An app cannot force the system to reveal or conceal preview text. If the alert must remain private, send generic text in the alert itself.
On Android, notification visibility and channel settings affect lock-screen display. A user may adjust a channel’s lock-screen behavior, so the app’s requested setting is not the only control. Android’s VISIBILITY_SECRET hides a notification on a secure lock screen; it does not mean “show a redacted version.”
Check other surfaces too. Notifications may be retained in notification history, appear on a paired watch or other connected device, or be captured by logs and diagnostics. These behaviors vary by device, settings, and software version, so test the combinations your app supports rather than assuming one device represents all users.
Configure Redacted Notifications
Redacted notification configuration uses platform features to show neutral text where possible and keeps private details behind normal app access. On Android, set private visibility and provide a public version. On iOS, use generic alert text and retrieve sensitive details only after the user opens the app.
Android: Set private visibility and a public version
Android API 21 and later support notification visibility and a public version. Set visibility to VISIBILITY_PRIVATE, then provide a separate notification with a neutral title and body using setPublicVersion(). On a lock screen that supports this behavior, Android can use that public version instead of the private content.
For example, the private notification might contain a message preview for display after the user opens the app. Its public version could say “New activity” and “Open the app to view.” Do not put the private text in the public version, its title, or another visible field.
For apps that use notification channels, Android API 26 and later provide NotificationChannel.setLockscreenVisibility(). Set the channel’s intended lock-screen visibility, but account for user control: channel settings can limit or change what the app requested. Check the effective setting on a test device.
Use VISIBILITY_SECRET only when the intended behavior is to suppress the notification on a secure lock screen. It is not a substitute for VISIBILITY_PRIVATE with a redacted public version. Verify behavior on the Android versions and device types the app supports.
iOS: Send generic alert text
iOS notification preview behavior is controlled by the user’s system settings. Since an app cannot force a particular lock-screen preview choice, the safe approach is to keep confidential details out of user-visible alert text. Send a generic title and body, then load the sensitive details after the user opens the app.
Apply the app’s normal authentication checks before showing protected content. Do not assume that opening a notification means the user has passed those checks. Also, do not depend on a notification service extension to make a sensitive alert safe by masking it later; avoid placing the sensitive text in the alert payload in the first place.
Push delivery does not equal display privacy
APNs and FCM transport encryption protects data in transit between systems, but it does not prevent sensitive text from appearing on a device or in other handling paths. A push payload can still be exposed through previews, notification history, connected devices, or logs, depending on implementation and settings.
Keep user-visible alert fields free of secrets. If an app needs to fetch private content after a tap, use a design that retrieves it only after the app opens and applies its access checks. Treat payload contents, analytics, and diagnostic logs as part of the same privacy review.
Verify Lock-Screen and Payload Privacy
Verification means testing both what people can see and what the system carries behind the scenes. Test locked and unlocked states, user preview choices, Android channel overrides, and paired-device surfaces. Inspect payloads and logs as well as the screen; a redacted display alone does not prove the content is private.
Use a test matrix before release. Include supported OS versions and the settings that change visibility. For each case, record the expected display and the observed display. If behavior differs across devices, document the supported result rather than promising a uniform outcome.
| Test case | What to check | Pass condition |
|---|---|---|
| Android, secure lock screen | Private visibility and public version | Only generic text appears when redaction is supported |
| Android, channel changed by user | Channel lock-screen setting | App respects the effective user-controlled setting |
| Android, secret visibility | Secure lock-screen behavior | Notification is suppressed, not mistaken for a redacted alert |
| iOS, previews set to show | Generic alert content | No confidential details appear in the alert |
| iOS, previews limited or off | User-selected preview behavior | App does not try to override the system choice |
| Watch or paired device | Mirrored notification text | No sensitive alert text is exposed there |
| Payload, analytics, and logs | Titles, bodies, and stored events | No secrets are present in user-visible or diagnostic fields |
For each test, inspect the actual push payload, not only the app’s local notification code. Check analytics and logs for message excerpts, account data, or codes. Test notification history where the device offers it, and check relevant paired-device settings.
A useful release threshold is simple: no sensitive field should appear in alert text, logs, or analytics unless there is a separately reviewed need and a suitable protection plan. This is a design check, not a claim that every device surface can be controlled by the app.
Practical Test Scenarios
These illustrative scenarios show how the same privacy rule applies to different alerts. They are test cases, not claims about a particular product or a measured study. Adapt them to the app’s behavior, device support, and user settings, then record actual results on supported devices.
A messaging app can send “New message” without naming the sender or quoting the message. The test should cover a locked phone, an unlocked phone, notification history where available, and a paired watch. The private message should appear only after the app opens and applies its normal access checks.
A financial app can send “Account update” rather than a balance or transaction detail. Test alert payloads and diagnostic logs as well as the lock screen. A generic display does not make a payload private if the balance remains in the alert body or is copied into analytics.
A sign-in app should not place a one-time code in a visible notification if confidentiality is required. Test the full delivery route and any history or paired-device surfaces. If the user must access a code, use an appropriate protected app flow rather than relying on lock-screen masking.
Conclusion: Treat Redaction as a Data Rule
Notification redaction works best when sensitive details are excluded from user-visible alert text, not merely hidden by a display setting. Android can show a supplied public version for private notifications; iOS preview behavior follows user settings. Neither method guarantees that sensitive payload content stays private everywhere.
Before release, inventory notification fields, choose generic alert text, configure Android visibility and channels, and respect iOS preview controls. Then test locked and unlocked states, settings overrides, paired devices, history, payloads, and logs. Recheck whenever notification types or app behavior change.
FAQ
These answers address common implementation and privacy questions about notification text redaction. The key distinction is between hiding text on one screen and keeping confidential data out of the notification system’s visible and stored paths. Use platform controls as one layer, and make the alert content safe on its own.
What is notification text redaction?
Notification text redaction replaces sensitive details with neutral wording in places such as a lock-screen preview. The user can open the app to see protected content after its normal access checks. Redaction does not automatically remove sensitive text from the push payload, logs, or other devices.
Can an app control iPhone notification previews?
No. iOS preview display is controlled by the user’s system settings, and an app cannot force the system to show or hide lock-screen previews. For confidential alerts, use generic title and body text so the alert remains safe under different preview choices.
How do I redact an Android notification?
For Android API 21 and later, set notification visibility to VISIBILITY_PRIVATE and provide a generic public version. On API 26 and later, also check the notification channel’s lock-screen visibility. Users can change channel settings, so verify the effective behavior on a device.
What does VISIBILITY_SECRET do?
VISIBILITY_SECRET suppresses a notification on a secure lock screen. It does not display a redacted public version. Use private visibility with a public version when the goal is to show a generic placeholder; use secret visibility only when suppression is intended.
Does encryption keep push notification text private?
Transport encryption protects data while it moves between systems, but it does not prevent the device from displaying the alert text. Sensitive content may also appear in notification history, paired devices, logs, or other surfaces. Keep secrets out of user-visible alert fields.
Should I rely on users turning off previews?
No. Users control their own settings, and they may choose to show previews. Make sensitive alerts generic by default, then use platform settings as an additional privacy layer. Do not assume an app can override the user’s choice or that every device uses the same setting.
Can a notification service extension hide sensitive text?
Do not rely on an extension to make a sensitive payload safe after delivery. A sensitive alert may be exposed through other handling paths or surfaces. Prefer sending generic alert text from the start, then retrieve private details after the app opens and checks access.
What should I test before release?
Test locked and unlocked states, user preview settings, Android channel overrides, supported OS versions, notification history where available, and paired devices such as watches. Inspect push payloads, analytics, and logs too. The pass condition is that no confidential detail appears where it is not intended.
(This article was written by one of our staff writers, Garrett Vance. Visit our Meet the Team page.)




