Issue
I want to check that user has enabled lock screen notifications or not. Settings -> Notifications -> Lock Screen Notifications
But I am not able to find any code regarding this.
Solution
Try this:
fun getLockscreenNotificationsEnabled(context: Context) =
android.provider.Settings.Secure.getInt(
context.contentResolver,
"lock_screen_show_notifications", 0
) != 0
Answered By - Pierre Janineh
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.