Alarm clock like services - android

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.

Related

Sending a push notification directly from the app

Not too experienced with mobile development, but I wanted to know if this was possible.
After the user installs the app (android or ios), the app should at least once a day "wake-up" and show a push notification to the user.
Is this possible?
If I understood you correctly, I believe that you need setup a recurring alarm using AlarmManager. You also need to setup starting alarm service on device reboot. You can write a method that does what you want so it get executed when the alarm runs e.g. show notification. The following links should help you:
Repeat Alarm Example In Android Using AlarmManager

how to trigger a react-native app to wake up? (for alarm)

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.

Android Alarm Manager not being triggered

I have my app installed in 2000 devices. In most of them it is working great. But some users (maybe 100) report me that the app is not updating correctly.
I found out that the problem is that the AlarmManager is not triggering an Alarm. The app is supposed to update data every 15 minutes so I use an Alarm Manager for that.
With no reason, it seems like it stops working after a while of running and it never starts again unless the phone is rebooted. Then it works again for a while and finishes stopping, too.
I don't have access to those devices but the users tell me they don't have any task manager or background cleaners. And in case they have them, then my app is in the 'ignore list'.
I have tried to emulate this scenario but I cannot.
It seems like the app is killed and the alarm managers don't work. By the way, those killed apps don't receive GCM events either.
So the questions are:
Is there anyway to prevent the app from being killed or to ensure the alarm is triggered at the time I set.
Can I use broadcast events like Screen-on, Screen-Off or Telephony incoming events to check if the alarm has been triggered and in case it is not to do it at that moment? I am not sure if this would work because if my app is killed then probably it will not receive any event, correct?

Access the device clock alarm settings?

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.

Alarm clock application in iphone and android using phonegap

While developing an iphone and android application using phonegap,came to a point where i have to build a alarm clock functionality like the image.
I am setting the alarm using Jquery which is running properly when user is in app. But it's not working when the app is closed or the phone is in sleep mode.
Is there any way to proceed?
I'm not sure if there is a phonegap equivalant, but in Android you'll need to use the AlarmManager for the alarms. This will launch your application when the alarm is triggered. You'll also need to set a WakeLock when you have active alarms. Otherwise the device can go into sleep mode and you won't get the alarms:
http://developer.android.com/reference/android/os/PowerManager.html
The Android Alarm uses the PARTIAL_WAKE_LOCK and only when there are active alarms.

Categories

Resources