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.
Mistakenly dismissed alarm!
Moderator: Martin
Re: Mistakenly dismissed alarm!
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:
and in action Set Alarm:
Hour
{alarm_time,dateformat,HH}
Minutes
{alarm_time,dateformat,mm}
Regards,
Martin
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);
Hour
{alarm_time,dateformat,HH}
Minutes
{alarm_time,dateformat,mm}
Regards,
Martin
Re: Mistakenly dismissed alarm!
Thank you Martin,
Your suggestion is running wonderful!
Your suggestion is running wonderful!
