I’m unable to cancel android alarm clock when it started
I have repeatedly attempted to add features that can let users cancel android alarm clock that announces the current time using android Text to Speech engine for ten minutes, but it has failed to cancel.
How to Wake Up the Screen in BroadcastReceiver After PowerManager.FULL_WAKE_LOCK Deprecation?
I’m working on an Android app where I need to wake up the device screen when an alarm is triggered. Previously, I used PowerManager.FULL_WAKE_LOCK to achieve this, but it has been deprecated.
Alarm manager but it should only work when the app is being used
I’ve worked with AlarmManager before but I only use it for when I want to run a code that is time specific when the app is not being used. Is there a way to create an AlarmManager that runs a code when the app is being used but it should stop when the app is closed?
Android AlarmManager fails to deliver alarm created with setExact if application is not running
As per Google documentation. https://developer.android.com/reference/android/app/AlarmManager.html “the Alarm Manager is intended for cases where you want to have your application code run at a specific time, even if your application is not currently running.” That is exactly my use case. I create Alarm with PendingIntent in my app setting few mins in the future, then I close the application. OS needs to deliver Intent via Broadcast and wake up my app. Application then triggers some internal function once Intent delivered to the app. All works fine if my application is running all the time:
Relevant code: