My app needs to wake the user up in the night so I would like to access the device's clock alarm and add my own in there. The alarm times shifts throughout the month, so I would need to access it and update it.
For example, I would like to add a daily alarm in the device clock alarm. Then everyday, I would like to run some calculation and adjust the time for the daily alarm.
Is this possible? I found AlarmManager but this seems like a scheduler not the device clock alarm. Perhaps there is an intent for the clock alarm? The screenshot below is the setting I am trying to access from my app (without rooting the device).
Here you have a tutorial about programming alarms for Android.
https://developer.android.com/training/scheduling/alarms.html
The thing is that is not needed to access the native clock app to set them, you can do it with your own app.
Be aware that this will not program an "Alarm"(with music and so on), it will only provide you the possibility to shcedule some task. In your case this task could be wake up the user with a loud music or whatever.
Related
I am building a reminder app and need to implement repeating alarms. Following the Android documentation on the topic everything runs okay except that:
Phone does not wake up if locked.
Phone won't ring.
When setting a regular alarm, the phone would ring (but never wake up). I would like to solve these two issues for repeating alarms. I'm on API 29.
Thanks in advance!
I am developing an application, one of the functions of which is the alarm clock. I saw that some applications with such a function can display the time of the next alarm clock, as if it were a system alarm clock. What API can I do this for?
I tried to send the broadcast android.intent.action.ALARM_CHANGED, but this does not work on my device (and somehow it works for other applications).
Basically I am trying to add an alarm feature to my app.
set time & date, save >> turn the app off >> when it's the time, RING-RING-!
But to do this, the app should wake itself to run the alarm feature; otherwise it won't work unless the app is running at the alarm time.
Any regular alarm apps just open itself when its the time, even when the app was not running on the phone. does anyone here know how apps self-wake?
Thanks very much
Use AlarmManager to do alarm envenif the app is not running.
But if the machine reboot, it will not work. So we need to run a service to register alarm when machine boot complete.
I want to create my alarm app.
but, I don't want to re-design a new alarm clock function.
so, I want to use android built-in alarm clock.
what I want the procedure is:
use android built-in alarm clock to set the time.
when the alarm is ring, my alarm app will be launched to replace built-in one.
use my alarm app to dismiss the alarm.
How could I make it?
Thank you so much.
How could I make it?
You can't. The only thing an SDK app can do with respect to the device's own alarm clock app is to display an activity to allow the user to set the alarm, with a filled-in set of values.
I want to develop an alarm clock like services in android that is the app should run on the some user entered time and even if the mobile is switched of that app should work as alarm clock works .
Use an AlarmManager. See this SO question. You'll also probably want to recreate your alarms on reboot (they're normally cleared then); see this android developers thread.