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.
fun getLockscreenNotificationsEnabled(context: Context) =
android.provider.Settings.Secure.getInt(
context.contentResolver,
"lock_screen_show_notifications", 0
) != 0
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.