Alarms with Snooze And Vibrate

In this example we want to use Tasker's 'IF' with 'END IF' and 'LOOP' tasks to run an alarm Task that is called by Profiles setting variables for the Alarm Task.

This is useful since we can 'clone' the Profile to create new Alarms.

Download the Alarm Task

This is the main alarm task which will;

1. Place a notification on the Notification Bar for the Alarm
2. Perform a Vibrate Pattern if the Media Volume is muted (set to 0).
3. Snooze for 10 minutes if the %ALARMSTATUS variable is set to SNOOZE which can be changed to meet our needs. Snooze is enabled by the Screen On Snooze Event below.
4. Run an IF/ENDIF routine if the %ALARMSTATUS is not set to STOP which plays the media file specified in the %ALARMSOUND variable in the calling Profile.
5. Waits 3 seconds for the media file to play.
6. Loops to replay the media file up to 20 times until snoozed or stopped. After 20 loops, SNOOZE is automatically set.

Download the Screen On Snooze Event Profile

This is the Snooze handler which sets the %ALARMSTATUS to SNOOZE when the Screen is turned on. This is an 'automatic snooze' feature simply by turning the screen on.

Download the Stop Alarm Event Profile

This is the Alarm Stop handler which sets the %ALARMSTATUS to STOP which will exit the main Alarm Task above simply by selecting the Alarm Notification on the Notification Bar.

Download this sample Lunch Alarm Profile

This is a sample Time & Date Profile for our Alarm routine which is set to 11:32am Monday-Friday.

NOTE: We can clone this Profile and change the %ALARM Variable to the name of our Alarm, and we can change the %ALARMSOUND variable to a media file on our SDCARD that we want the alarm to sound. The media file wait time in the main Alarm Task above is set to 3 seconds in this example which can be changed to accommodate different media files.

Download this Alarm Sound

This is the sound file for our example. We should place this file on our SDCARD in the '/media/audio/alarms' directory for this example.

NOTE: The sound file for this example is nice and annoying. Hint from Star Trek: 'ALL HANDS, MAN YOUR BATTLE STATIONS!!!'

Page Contribution

This page was contributed by DaWeav.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License