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.
CodePudding user response:
Try this:
fun getLockscreenNotificationsEnabled(context: Context) =
android.provider.Settings.Secure.getInt(
context.contentResolver,
"lock_screen_show_notifications", 0
) != 0
