Model's attempt to fix: 1) Only the first itnerval making a sound, all subsequent countdowns being silent. 2) App opening up directly to the Alarms & Reminders screen to get permissions approved without any prompting the user on what is going on.

This commit is contained in:
me committed 2026-11-03 13:16:32 -07:00
1 parent 9f1bfe8940
commit 262aa439db
2 files changed
+25 -16

No files matched your search

@@ -97,8 +97,16 @@ public class MainActivity extends AppCompatActivity {
// Check exact alarm permission for Android 12+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && !Alert.isExactAlarmAllowed(this)) {
if (DEBUG) Log.w(tag, "Exact alarm permission not granted, requesting...");
Intent intent = new Intent(Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM);
startActivity(intent);
new AlertDialog.Builder(MainActivity.this)
.setTitle("Alarm Permission Required")
.setMessage("To ensure the timer alerts you reliably, please grant 'Alarms & Reminders' permission in system settings.")
.setPositiveButton("Grant Permission", (d, w) -> {
Intent intent = new Intent(Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM);
startActivity(intent);
})
.setNegativeButton("Not Now", (d, w) -> d.dismiss())
.setCancelable(false)
.show();
}
if (DEBUG){