6

I'm implementing a simple alarm system into my Android app using the built-in alarm clock app. I can create an alarm easily using ACTION_SET_ALARM and that works, but I need to be able to dismiss specific alarms should the user remove or change the equivalent event in my app. The official documentation for ACTION_DISMISS_ALARM says:

The alarm to dismiss can be specified or searched for in one of the following ways:

  1. The Intent's data URI, which represents a deeplink to the alarm.

But I can't figure out how to get the deep link URI for the alarm that was created. Could anyone please help me with how to do this? Thanks!

The post Why startActivityForResult not returning any result from AlarmClock.ACTION_SET_ALARM intent? implies that the intent doesn't have an official result, which is the only way I thought may work to get the URI.

I don't want to do a full implementation with AlarmManager and a custom alarm system at the moment unless I have no choice. If I can get AlarmClock to work that it would do exactly what I need.

0 Answers0