Adding an alarm to Android Alarm clock

If you need to set an alarm from within your application, you might be guided to the android AlarmManager. While it’s possible to use the AlarmManager to fire an alarm, sometimes you want to use the alarm application the user has installed himserver.

To do so, you can use AlarmClock.

This can be done in the following way:

You’ll need to add the right security permission to your manifest though:

A small note: there’s no way to cancel the alarm after the intent has been sent. If you need more control over your alarm, you’ll need to to use something like the AlarmManager anyway, which provides more control over your set alarm, like cancelling.