In Android, if a user has lock screen and has selected hide sensitive information option, the notification's description shows as "content-hidden" while the screen is locked. I understand that this is how the feature is designed but is there a way for the notification of my app to be displayed as normal notification in this case too?
My app is solely based on Notifications so I want to give user a change to always see the notifications, if he wishes. I tried searching for a way to always show notification text but couldn't find any.
The Notifications guide on visibility notes that you can use setVisibility() with VISIBILITY_PUBLIC to always allow users to view your notification, even when they have "Hide sensitive information" enabled.
You can also use setPublicVersion() to build a separate notification that shows only non-sensitive information to specifically handle this case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With