Tasker walkthroughs

1. Create an “Add alarm” widget with Tasker

Sleep as Android does not offer a widget to add an alarm directly.

How to create one in Tasker?

  1. Fire up Tasker, go to Tasks tab and add a new task (+) named Add alarm

  2. Tap + to add an action, select System > Send Intent

    1. In action, insert com.urbandroid.sleep.alarmclock.SetAlarm

    2. As package, set com.urbandroid.sleep

    3. As target, select Activity

    4. Go back to confirm

  3. Add an icon in the lower right corner

  4. Long press on your desktop and add a Shortcut > Task shortcut and select Add alarm (your new task)

  5. Don’t forget to enable Tasker!

2. Integrate Sleep with hueManic

You can use any of the Sleep as Android’s events in Tasker to start a service com.urbandroid.hue/.ProgramService with following extras:

to start a program


to stop a program

EXTRA_PROGRAM needs to have one of the values:


2.1. The actual walkthrough

Tasker > Task > Add task > Choose a name > Plus button > System > Send intent

  • Package: com.urbandroid.hue

  • Class: com.urbandroid.hue.ProgramService

  • Extra: EXTRA_START:start


  • Target: Service


Tasker > Profile > Plus button > Event > Plugin > Sleep > Configuration > Alarm started > Back > Back > Choose your task

Now make sure Tasker is enabled, hueManic installed and the Disco program will start on your alarm.

Adapt the specific conditions to your needs.

3. MiBand : Get notification when alarm starts

How to have your Mi Band notify you with LED / Vibrations when your alarm ( Sleep as Android ) goes off.. ( Using Mi Band Tools )

  1. Tasker → Profile → Plus button → Event → Plugin → Sleep → Configuration → Alarm Started

  2. Create a task for this event. Notify → Select any title like ‘AlarmStarted’ which will send a notification in your status bar when alarm is triggered.

  3. Open Mi Band tools and set an alert for Tasker application and filter with the title used earlier, ‘AlarmStarted’ .

Many thanks to Pratik Jain!

4. Start sleep tracking at a fixed time automatically every day

Sleep as Android does not have automatic sleep tracking start, but you can easily implement that yourself using Tasker!

  1. Start Tasker

  2. Create a new profile using the plus button on Profiles tab > Time > Set From and To time to the same time (e.g. 10PM)

  3. Hit back

  4. Select New task and give it a name

  5. Add an action using the plus button > Plugin > Sleep > tap on the pencil button > select Start sleep tracking.

  6. Hit back three times.

  7. Make sure to activate Tasker (long press in the upper left corner > Enable)