Ensure exact alarm permission before sending scheduled/delayed messages

This commit is contained in:
Moez Bhatti
2022-12-14 17:01:56 -05:00
parent c1483d2c93
commit c31d38905b
4 changed files with 41 additions and 8 deletions
@@ -309,4 +309,12 @@ class Navigator @Inject constructor(
}
}
fun showExactAlarmsSettings() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
val intent = Intent(Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM)
.setData(Uri.parse("package:${context.packageName}"))
startActivity(intent)
}
}
}