Alarms
General
Sleep tracking
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
Huawei together with Xiaomi are the most troubled phones on the market, some vendors tent to ignore Android best practices and implement very bizzare custom modification which make background task nearly impossible to run.
Please take a look at http://sleep.urbandroid.org/documentation/faq/alarms-sleep-tracking-dont-work/
- 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 hearable 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.
- Ultrasound is generally considered safe if it is at normal volume. Regarding health effects, it works in a similar way to normal hearable 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.
- 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 hearable 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.
Sleep as Android doesn’t come with automatic sleep tracking. Actigraphy by itself isn’t a good method to tell if you have fallen asleep.
On the other hand, you can setup Sleep as Android to start sleep tracking at specific time, using Tasker. Just install Tasker and create a profile which starts “Start sleep tracking” event at the time of your choice.
Please make sure that you are not accidentally starting the Sleep as Android app from your watch. This would start sleep tracking immediately.
On Samsung S2, we observed an issue where sleep tracking started really on its own. We have found a solution for the issue, so please uipdate to the latest version of Sleep as Android to have it.
Unfortunately, quite a lot Android devices out there do not support gathering accelerometric data (sleep tracking) with screen-off. This is duo to a bug which is on 100% of devices with Android version 1.6 to 2.3.4, on many +2.3.5 device and even on several devices with +4.0. We are doing an automated detection of whether you device is screen off tracking capable or not. In case we detect it isn’t we turn screen on automatically during sleep tracking in order to keep tracking functional.
Crashing during sleep tracking seems very rare but still may happen on some firmwares, especially on custom ROMs.
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.
On Galaxy Nexus and few Motorola devices, you may be experiencing an issue that the sleep graphs turns wild at a specific hour during all tracking.
From various error reports we know that the accelerometer sensor implementation on some firmwares has issues. Over the time the accelerometer may get into a broken state and it stops sending data. The only way we know to resolve this issue is to do a reboot. In all cases so far, reboot did solve this issue.
To test whether the accelerometer is working, you can use menu > test sensors or some 3rd party app such as Sensor List.
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.
The red block indicates that something went wrong with tracking at that time. We did not get the expected data from accelerometer. Maybe Your phone has restarted or if You are using smartwatch, we could have lost connection to it.
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.
Filter is based on comments and tags. For example you can easily only show your graphs when you did some sport the day before by typing sport into the filter field.
In most cases sleep tracking itself is not consuming 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 and the consumption is anyway mistakenly accounted to the app holding the wake lock (Sleep as Android in this case). We would suggest checking which services are running before you get to sleep and try to kill some of them or reboot your phone prior tracking. For more details, please read Troubleshooting.
Probably your phone has been detected as unable to track with screen off (please check Application settings → Misc → Screen off tracking). Please see Troubleshooting for more details.
We calculate 4 most frequent places from a year of data history. I year should be sufficient so that you can for example watch your sleep at your holiday home where you go regularly in the summer. Should you move, your new home will gradually become geo3->geo2->geo1->home after some time as it becomes dominant in your data.
We use a method called sleep actigraphy and there are several scientific papers which show that it is not as precise as PSG but still provides reasonable data and more over it is more convenient for the user. The phone has an accelerometer sensor build in which is very sensitive and if placed in your bed we have a record of your movement over the nigh. In deep sleep your muscular movements are suppressed (otherwise you would be running or jumping around according to your dreams :)) and thus in this phase the sleep graph gets nearly flat. This is in short how we measure your sleep phases, for more details refer to How it works.
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, please check here. This certainly solves the problem for a little convenience trade-off.