Page 1 of 1

Mistakenly dismissed alarm!

Posted: 01 Jun 2017 05:22
by Friend1
Hi Martin,

When i mistakenly dismiss alarm, need to set new alarm to {HH}:{mm + (snooze_time)/2}. It's possible? Can you show me a example? Or can i get current time as hour and minutes, increment minute value and reset alarm? Thanks a lot.

Re: Mistakenly dismissed alarm!

Posted: 02 Jun 2017 19:27
by Martin
Hi,

You could use trigger General Broadcast with action com.android.deskclock.ALARM_DONE to detect when the alarm was dismissed. You could use a condition Confirmation Dialog to manually confirm if the alarm was dismissed by mistake or not and then use action Set Alarm to create a new alarm if needed.
I would use a script to calculate the new hour and minute. Something like this could work:

Code: Select all

alarm_time = addMinutes(triggertime, 5);
and in action Set Alarm:
Hour
{alarm_time,dateformat,HH}
Minutes
{alarm_time,dateformat,mm}

Regards,
Martin

Re: Mistakenly dismissed alarm!

Posted: 05 Jun 2017 06:07
by Friend1
Thank you Martin,

Your suggestion is running wonderful! :D