I am attempting to write an application that automatically sets the Android default alarm based on some preset values determined by an alternate algorithm.
The alarm setting works fine using the ACTION_SET_ALARM intent, however every time I run the app, it sets a NEW alarm. I'm wondering if there is any way to instead have one unique alarm set to update every time the activity sets the alarm (so that there are not hundreds of new alarms in the Android alarm application).
I will provide code excerpts if necessary, however it seems that this question can be answered without specific examples. NOTE: I am not using the Android alarm system that is intended for informing other activities of certain events, but rather the actual Android alarm that users will utilize to wake up in the morning.
Thank you in advance for any assistance!Answer1:
It turns out that this is actually not possible given the scope of my problem. Instead, I had to work with a list of manufacturer specific alarm clocks (<a href="https://stackoverflow.com/questions/4115649/listing-of-manufacturers-clock-alarm-package-and-class-name-please-add" rel="nofollow">here</a>) and handle each case specifically.
In the case where the user is still going to use the open source alarm, I had to remove the ACTION_SET_ALARM intent as there is currently no workaround for the redundant alarms issue. The user would have to manually delete each alarm.