Android Lollipop Notifications
Android 5.0 introduced Lock screen notifications. Lock screen notifications allow the user to view more information within the notification and decide to unlock the device afterwards.
Since notifications sometimes contain sensitive information, displaying them on locked screens could cause privacy concerns.
To address the privacy issue, Android 5.0 also introduced visibility options to notifications, which allows developers to control the content of the notification displayed on the locked screen. Develops can use the following options on notifications:
-
VISIBILITY_PRIVATE: The default behavior. Visibility_Private is used to show the notification on all lock screens, but conceal sensitive or private information on secure lock screens.
-
VISIBILITY_PUBLIC: Show this information in its entirety on all lock screens. • Notifications displayed here have zero privacy.
-
VISIBILITY_SECRET: Does not reveal any part of this notification on a secure lock screen. This option is the most private.
Please note that the above options are only enabled when the user has enabled on “Hide sensitive notification content” from the Settings menu.