Nat Strangerweather
fun checkNotificationPolicyAccess( notificationManager: NotificationManager, context: Context ): Boolean { if (notificationManager.isNotificationPolicyAccessGranted) { Toast.makeText(context, "Notification policy access granted.", Toast.LENGTH_SHORT).show() return true } else { // add dialog here } return false }
@Composable fun NotificationPolicyPermissionDialog() { val openDialog = remember { mutableStateOf(true) } Dialog(onDismissRequest = { openDialog.value = false }) { Box(Modifier.preferredSize(100.dp, 100.dp), backgroundColor = Color.White) } }
Brian Beale
A modern programming language that makes developers happier.