Smart wakeup

1. What it does

Looks for the best moment to wake you up for a great morning.

Waking up in light sleep feels natural - like on a weekend, without any alarm.
In contrast, deep sleep wake up (which is common with ordinary alarm clocks) leads to an unpleasant experience accompanied with feeling of tiredness, sleepiness, disorientation.

With smart wake up, you set up a time window (also called Smart wake up period), in which you’d like to be woken up once it is the right moment.

Alarm time: 8:00
Smart period: 30 minutes (default)
Sleep as Android will wake you between 7:30-8:00, once you are in light sleep for some time. The scheduled alarm time (8:00) is considered as the last possible wake up time.

2. Where to find it

Settings → Sleep tracking → Smart wake up

3. Options

Smart period

Set the smart period - time window before alarm to be awoken in.

  • Disabled - alarm goes off exactly at alarm time

  • Power nap - special type of smart period which wakes you after the alarm time, see Power nap

  • 5 minutes - 2 hour - alarm goes of during the selected period prior to alarm time

Nap smart period

sets a smart period for naps with tracking and naps from shortcuts

  • Disabled - alarm goes off at alarm nap time

  • Power nap - See Power nap

  • 5 minutes - 2 hour - alarm goes of during the selected period prior to alarm time

4. Advanced options

Movement sensitivity

Adjust sensitivity of smart alarm. With less sensitivity, you need more noticeable movement to trigger alarm.

Not before ideal sleep

Does not allow the alarm to ring before reaching either ideal sleep duration or alarm time.

Warning In some cases this option can render Smart wake up ineffective. It can lead to ignoring the smart period for the sake of reaching ideal sleep duration.

FAQ

Alarm rings before set alarm time

  • Smart alarm is enabled (see Smart wake up), so the app is waking you within the smart period, when light sleep is estimated.

  • If that is not what you expect, disable smart period in Settings → Sleep tracking → Smart period.

  • You can also try different smart period: shortest period is 5 minutes, longest is 2 hours.

Alarm sound is too quiet

Gentle volume increase is enabled or set for too long period
  • Try shorter period in Settings → Alarms → Gentle volume increase, the shortest period is 1 minutes - the volume goes from zero to full volume during one minute.

Your ringtone volume might be too too low
  • Check the volume of the ringtone in Settings → Alarms → Ringtone or in the settings of each individual alarm in per-alarm settings.

Alarms do not play selected ringtone

Loading of the selected file may have failed
  1. Make sure that you have selected the correct ringtone - check per-alarm settings and Alarm default settings.

  2. Check if the file has not been moved or deleted and that SD card is available at the time of the alarm.

  3. Check that the app has storage permission to access that file.

Online service (Spotify, Google Music, online radio) may not have responded

When the service is not responding for too long, the app uses a build-in ringtone.
When alarm starts and your phone is locked we are unable to change the playlist or album in your Spotify app. In this case the app will play simply where you last left it.

Alarms do not ring

  • Make sure no system restrictions are applied to Sleep as Android: Check our guide here.

  • If the guide won’t help, send us your log using Leftmenu → ic bug Report a bug.

Alarms go off exactly at the alarm time

  1. Increase the sensitivity of Smart wakeup in Settings > Sleep tracking > Movement intensity.

  2. If you feel the smart alarm is not working at all, please send us the application log by using Leftmenu → ic bug Report a bug.

Alarms go off exactly at the beginning of smart period

  1. Lower the sensitivity of Smart wakeup in Settings → Sleep tracking → Movement intensity.

  2. If you feel the smart alarm is not working at all, please send us the application log by using Leftmenu → ic bug Report a bug.

Alarms go off one hour late (59 minutes)

  • Your smart period is set to Power nap (see power nap)

  • When this option is selected as your smart wake up method, the warning screen with an explanation needs to be confirmed.

    1. Change the smart wake up period in Settings → Sleep tracking → Smart wake up → Smart period or in Settings → Sleep tracking → Smart wake up → Nap smart period

Alarms play at max volume

  • Most probably your Backup alarm went off after regular alarm did not wake you up. Backup alarm is triggered when there is no interaction (no snooze, no dismiss) for more than 20 minutes.

  • Make sure you are using volume strong enough in Settings → Alarms → Ringtone, or enable Gentle Volume increase in Settings → Alarms → Gentle volume increase

  • Try vibrations (Settings → Alarms → Vibrate).

Send us your log using Leftmenu → ic bug Report a bug

Calendar skipped my alarm

If you are using the Skip alarm for holiday feature, SaA might offer to skip your next alarm even if there is no holiday in your country tomorrow. This is because we use Google public holiday calendar, which is sometimes wrong.

Captcha did not work at all

  1. Send us the application log by using Leftmenu → ic bug Report a bug right after you encounter any troubles with the Captcha task. Please, add a short description, what exactly is happening.

Customized vibrations on MiBands

Vibration can be controlled only from the companion app, because the integration with MiBands is not direct (the API is not available for the integration).
Luckily, both companion apps allow vibration customization in the pro versions.

1. Tools & MiBand

  1. Enable priority override mode for MiBand Tools app: pull down the notification bar, and on the MiBand Tools status bar notification, press the first icon multiple times, until you enter priority override mode = you will se an exclamation mark.

  2. In Mi Band Tools app: Leftmenu → Settings → Sleep as Android → Custom vibration adjust the vibrations. You can set vibration count and length, and delay between vibrations.

  3. Test the resulting vibration pattern with Test vibration.

2. Notify & Fitness

  1. Enable custom vibrations in Sleep as Android settings section.

  2. Open the vibration settings with the Vibration button.

  3. Adjust the vibration pattern - you can change intensity and duration, and also vibration delay.

  4. Test the resulting vibration pattern with the Play button in the top right corner.

Full screen alarm is not displayed on Android 10

Please note that Google made it impossible to start screens from background on Android 10. This is why we can no longer show the alarm screen with the big buttons under usual settings. On Android 10, the app can just show notifications from background if screen is on when alarm starts. If screen is locked we usually are able to show the full screen alarm.

To get full screen alarms back:
. Enable the option Always fullscreen alarm in Settings → Alarms → Aways fullscreen alarm (might be hidden under Advanced in Snooze/Dismiss section).

Google Play Music

Warning Online Google Play Music is not supported. We only support playlists of locally available music created by Google Play Music.

Sleep will only see playlists:

  • that are created from local music

Sleep will NOT see playlists:

  • that are created in Play Music web app (https://play.google.com/music/) and downloaded via Play Music

  • that are created from music that was downloaded via Play Music app (using the download button inside Play Music)

The reason is that we actually do not support Google Play Music at all. We support Android Playlist API which is supported by Play Music and other media player apps – they can register a list of songs as a playlist (locally on the phone), and then we see this playlist.
However Play Music in fact has another internal way of creating playlists, which is somehow different and not transparent to us, and we are unable to read these playlists.​
That’s why when selecting the playlist in Sleep as Android, sometimes you hear the playlist and sometimes not.

How do I get BT smart heart rate device work with Sleep as Android?

  1. Enable the tracking in Settings → Wearables →Bluetooth Smart (might be hidden under Advanced section).

  2. Try to pair with your device (this may not be required for all devices and OS versions).

  3. Make sure no other app is using your device while sleep tracking.

If nothing helps please send us a debug report using Leftmenu → ic bug Report a bug.

Note BT Smart heart rate tracking only works from Android 4.3 onward

How does Sleep as Android (actigraphy) compare to Polysomnography?

We use a different input than polysomnographists, and define our own sleep phases, reflecting an objective aspect of sleep, easy to measure with common devices. One naturally needs to ask whether there is any relationship between the EEG-phases and our ACT-phases.

Fortunately, several research teams raised similar questions before (See this one, or this one, or this one, or this one). They measured a bunch of people on a traditional polysomnograph and recorded their physical activity at the same time (By filming them and then counting the movements manually, or by using accelerometer readings). The published analyses show that there indeed is a significant statistical relationship between EEG-phases and body movements.

You can also read about comparison of Sleep as Android algorithms and Sleep lab results on our blog here.

How does the Battery saving mode in Sleep tracking work?

Battery saving mode currently resumes full tracking before the smart wake up period in order to find the best moment for your wake up, so the tracking uses up just a fraction of the battery consumption for the whole night. If the battery would drop under your defined stand-by threshold (default: 10%) the battery saving mode will re-occur.

I do not trust the results, it is fake / generating random data

Accelerometric sensors are really sensitive, which is great for sleep tracking. Normally, what you see when you leave the phone on the table gets immediately dwarfed when you do some more significant move. Just leave phone on the table for a while and you will see a dramatic development, but then move the phone and you will see all the development is really tiny in comparison to the new peak.

So what you see is random noise, given by very small vibrations of the table or in very calm areas by seismic movement. We mark the data relatively, so you always get it distinguished into light and deep sleep. But the algorithm works well only in conditions that are assumed by it, i.e. in the bed with relatively large movement peaks.
To be more specific, if you leave the phone on a table, you can get values perhaps on the scale of 0.000001 to 0.000009 m/s2 (The value is made up here, but it is physically very small). In the bed, you may get values from 1 to 9 m/s2 (which is physically large). The algorithm sees though just that the high value is 9 times higher than the low value, in both cases.
We had to do this because every accelerometer (in different cell phones) measures differently, so we couldn’t assume any standard conversion formula that would respond to absolute values.

So if you use the phone in the bed, it is in fact drastically different from measuring on a calm spot, just like the table.

Please do not hesitate to ask for any clarification at support@urbandroid.org.

I had to solve Captcha (not at home) when I was not at home

  • Not at home feature only works when we see your location is significantly different from the home (±5km at least) as we do not collect fine location for privacy reasons.

Send us the application log by using Leftmenu → ic bug Report a bug

I have a dog / cat sleeping with me in bed. Will the sleep tracking be accurate?

This depends on several factors. The general rule is to not allow the pet to move your phone, ideally only your movements should move the device. So in this case it’s best to place Your device either under the pillow or to have an armband or smartwatch/smartband. If your pet is a calm one, it may just work. However, if your pet is used to jump in and out of bed several times a night, the sleep tracking will most probably register these events as light sleep occurrences.

Is sonar safe?

Is sleep tracking with sonar safe for your health?

Ultrasound is generally considered safe if it is at normal volume. Regarding health effects, it works in a similar way to normal audible sound, i.e. very loud ultrasound can damage your hearing, whereas at low volume it is safe to hear. When using speakers, smartphones are nowhere close to be able to produce such loud sounds as to damage your hearing.
We also use ultrasound that is very close to the hearing range (around 20 kHz), so the effects of the ultrasound are almost identical to hearing a high pitched sound at the same volume (expect you can’t hear it at all).
The ultrasound volume we use is around 40 dB – which is lower than normal speech volume. You can measure the sound level yourself using e.g. this app.

Is sonar safe for your pets (cats, dogs, bats)?

For pets that are able to hear it, the ultrasound emitted from Sleep as Android is a constant low noise. The situation is similar to e.g. refrigerator noise. It is there, you can hear it, but it’s not so much disturbing. The ultrasound definitely cannot damage your pets hearing at the volume used in Sleep as Android.
Bats can be confused and fly into walls.

Is sleep tracking with sonar safe for your smartphone?

The only difference between normal audible sound and our sonar is that the frequency is a little higher (normal frequencies 2 Hz-20 kHz, our sonar frequencies 18 kHz-22 kHz). This is so small difference for the mic and speaker membranes that there is definitely no chance of damage, even with prolonged usage.

Lockscreen does not unlock on alarm

XiaoMi / MIUI

On Xiaomi/MIUI, you need to grant special permission to Sleep as Android so that it may unlock your screen during alarm.

  1. Go to System Settings → Permissions → Advanced Permissions → select Sleep app and give it permission to access Lockscreen.

Samsung

When alarm goes off, it does not disable the lockscreen and you have to manually unlock the device to tap snooze or dismiss.

You may have Sleep as Android enabled under Border lights. This causes the alarm popup to not display over the lockscreen, as the notification is being shown as a light around the edge of the screen.

  1. Disable Border lights for Sleep as Android in your device’s settings.

Lockscreen does not unlock on alarm (Samsung)

You always get full screen alarm, when at least one of the following is true:

  • Sleep tracking is running

  • If you have a keyguard (lockscreen) set up

  • If you have a Settings → Alarms → Flip to snooze option turned on

It sounds a little hacky, but the reasoning is simple. Some people want to use the heads up notification, it can be convenient if the alarm rings while you’re operating the phone. Flip to snooze is an option that cannot work with notification (it is impossible by design), so if you turn it on, we forbid all heads up notifications and go to “full screen alarm only” mode.

On Android M, it is also possible to turn off heads up notifications per app in Android Settings → Apps → Sleep as Android → Notifications → Allow peeking.

Mi Band button dismiss / snooze

You can choose, if the MiBand button has the power to snooze or dismiss your alarms.
If you need some extra motivation to get out of bed, you can have the button without any action - are forced to get up and dismiss the alarm on the phone.

1. Tools & MiBand

In Leftmenu → Settings → Sleep as Android → Mi Band Button Action

  • None - the button will not have any effect on alarm

  • Dismiss

  • Snooze

2. Notify & Fitness

In Sleep as Android settings section:

  • Dismiss - enables dismissing alarm with the button (dismiss will be confirmed with a vibration)

  • Snooze - with two button press, you can snooze the alarm (will be confirmed with a vibration)

  • No action for the button - disable both previous options

My selected Spotify playlist / album is not played on alarm (or different playlist, different album)

  • Unfortunately our Spotify integration is all reverse engineered and thus may stop working any time Spotify updates their app.

  • When alarm starts and your phone is locked we are unable to change the playlist or album in your Spotify app. In this case the app will play simply where you last left it. We have not found a fix for this yet.

Only the first created alarm goes off

  • When multiple alarms are created close together, they might overlap each other.

  • If you created more alarms to make sure you are waken up, please note, that the app has a Backup alarm feature to make sure you are waken up.

Phone gets hot during tracking

Usually this is not caused by the sleep tracking directly as this is usually not consuming too much resources (usually around 1-3% battery per hour of tracking).
The issue appears because we hold a wake lock (keeping the phone awake) – any badly written apps may access the CPU extensively during the sleep tracking time. We suggest checking which services are running before you get to sleep.
For us it is hard to debug this. Also battery statistics are not a hint here as all battery consumption is accounted to the app which holds the lock even it did not consume the battery – this is by design in Android.

To conclude, this issue may happen, although we did not get any similar reports for a very long time now. But the most probable cause is some wrong 3rd party service or app on your device.

To see more on the issue we would need a debug report (menu > report a bug).

A good test would be to reboot your phone before sleep tracking (or kill any unnecessary services running) and see if that helps.

Samsung Galaxy Gear - Watch app stucks at Start tracking

This can be a result of multiple things, so please make sure to do the following troubleshooting:

  1. Make sure you have Sleep as Android Gear Addon installed on your phone

  2. It can happen that the addon cannot be started by us if it was force stopped previously. In that case please go to Play Store app on your phone, open addon page tap on “OPEN”.

  3. Opt out of any battery savers that you might have on your phone, for all involved apps (Sleep as Android, Sleep as Android Gear Addon, Samsung Accessory Services) – to find out how to do that, please consult dontkillmyapp.com

  4. Samsung Accessory services sometimes misbehaves and prevents connection to the watch for 3rd party apps. Please uninstall and reinstall it.

Silent alarm goes off with a sound

Battery optimization was enabled
  • When battery optimization is enabled, vibrations do not work, so the app is loading the built-in ringtone to ensure your wake up.

    1. Check Settings → Sleep tracking → Battery optimized.

    2. Do not enable Save battery option from the Tracking screen → Stop and save pull up menu → Save battery.

Phone was rebooted
  • When the phone screen is locked after a reboot, the app cannot load any files.

  • The phone rings with the build-in ringtone and vibrates.

Sonar is audible, strange sounds when using sonar

We have reports that on some device you can hear audible artifacts during sonar tracking. It sounds like this:

Some of the signal gets into audible spectrum probably due to either insufficient quality of the speaker or some post processing which is applied to the output on your device firmware.

We have also some reports that Sonar can get audible suddenly during tracking in the night. Unfortunately we are not sure why this could happen, we only have very few such reports and we are not able to reproduce this on our phones.

To make any audible artifacts less likely:

  1. Go to Settings > Sleep tracking > Test sensor.

  2. Try different frequency from the drop down menu list.

  3. When you find the least affected frequency, you could try lowering the volume a bit (the sliding bar). But keep it as high as possible to maintain reliable results.

Note If the volume needs to be adjusted, always confirm that sonar is still working - ideally after you change settings, try to sit calm in font of the test for few seconds and than move slightly - do you see a spike?

Tracking crashes, stops suddenly

If the tracking stops completely after few minutes, the background processes are restricted by your system.

  • Make sure no system restrictions are applied to Sleep as Android, or any companion app for a tracking with wearable: Check our guide here.

  • If the guide won’t help, send us your log using Leftmenu → ic bug Report a bug.

Tracking starts on its own

  1. Please make sure that you are not accidentally starting the Sleep as Android app from your watch. This would start sleep tracking immediately.

  2. Make sure you are not using automatic start of sleep tracking in Settings → Sleep tracking → Start sleep tracking.
    You can find more information about automatic sleep tracking start here.

Volume jumps to max when tracking

Warning The volume needs to be kept at maximum when tracking with sonar for maintaining the reliable results.
  • Unfortunately, this also affects media volume in 3rd party apps, and we cannot control those separately from sonar media volume. This means that while using sonar, you can only use media apps on full volume.

  • You can set a time delay on start of tracking in Settings → Sleep tracking → Awake detection → Delayed sleep tracking.

External players
  • When using sonar, you cannot control media volume by volume buttons as it always jumps back to maximum.

Lullabies
  • You can control volume of lullabies from the Sleep app (Settings → Lullabies), and from the Lullaby add-on pack.

  • When you lower the volume with volume buttons, the lullaby volume is estimated and adjusted accordingly, sonar volume is still kept at maximum.

Why is Sleep eating so much battery? What about battery overheating?

Usually battery consumption issue or related issues causing phone over-heating during sleep tracking are not caused by the sleep tracking directly.

In most cases sleep tracking itself is not consuming too much battery (usually around 1-2% per hour of tracking). But because we hold a wake lock (keeping the phone awake) any other usually badly written apps may access the CPU extensively during the sleep tracking time. We would suggest checking which services are running before you get to sleep. For us it is hard to debug this. Also battery statistics are not a hint here as all battery consumption is accounted to the app which holds the wake lock even it did not consume the battery (this is by design in Android).
A good test would be to reboot your phone before sleep tracking (or kill any unnecessary services running) and see if sleep tracking will still consume too much battery afterward. Features within Sleep as Android which may cause higher CPU load during tracking include noise recording. You may try tracking without it for a reference. Also I would strongly recommend to track with airplane mode on.

Why is there a red bar / section / block in my sleep graph?

The red block indicates that something went wrong with tracking at that time and the device stopped providing sensor data for some reason. Usually those are some non-standard battery optimizations or battery savers, the battery gets too low so we preserve it for the alarm or connectivity issue if you use a wearable.

1. Battery restrictions

Make sure no system restrictions are applied to Sleep, or any involved apps like wearable companion app).
See our guide here, and follow the instructions.

2. Too low battery

When the battery is too low (usually below 10%), data collecting is terminated to preserve enough battery for alarm.
When the battery was too low, there is a battery icon is displayed on the graph:

low battery
Figure 1. Low battery graph

3. Connectivity issues with a wearable

When the connection with the wearable is lost, you can see red sections on the graph. The app always tries to reach the wearable again.
The graph can look like this:

red wearable
Figure 2. Connection lost during tracking
  1. Opt-out from any battery restrictions is applied by your system (https://dontkillmyapp.com/)

  2. Pair the wearable with your phone in System settings.

  3. Make sure the BT is not lost, and try lowering the distance between the phone and the wearable.

  4. Try settings the device as Trusted device.

Why it is not possible to enable airplane mode automatically after sleep tracking starts?

Unfortunately due to dummy security restrictions the Android team introduced in 4.2 there is no option to enable airplane mode from an app automatically. You always have to use the settings or long touch power button. If you have a rooted phone you may consider using https://play.google.com/store/apps/details?id=lv.id.dm.airplanemh we have support for that in Sleep. There is a similar hack for 4.3.

If you don’t agree with the Android team design decision you can upvote issue 40497 here http://code.google.com/p/android/issues/detail?id=40497.

Why sleep record data count towards the end date

There is no clearcut answer to which day the sleep between them belongs.

We have decided to attach the sleep to the day after, because how you slept will largely determine how your day will be.

Will sleep tracking work with two people in the bed?

If you have separate mattresses there is minimum interference from your partner. If you have one big shared mattress (which isn’t recommended as you partner may need different mattress for his healthy sleep), it could still work assuming you keep your phone close to your body and ideally on your side of the bed.

You can also consider using a armbands or smartwatches. This certainly solves the problem for a little convenience trade-off.

If both of you are tracking, you can enable pair tracking, which filters out the partner’s activity.