What to do if alarms or sleep tracking don’t work?

The core of the problem

Smartphones are getting more and more powerful, but the battery capacity is lagging behind. Vendors are always trying to squeeze some battery saving features into the firmware with any new Android release. With Android 6 (Marshmallow), Google has introduced Doze mode to the base Android, in an attempt to unify battery saving across the various Android phones.

Unfortunately, vendors such as Samsung, Huawei, OnePlus (and more) did not seem to catch that ball and they all have their own battery savers, usually very poorly written, saving battery only superficially.

These battery saving features have lots of side effects. They usually kill long running processes – but don’t care whether the user wants the process to run or not (think sleep tracking).
They also impose arbitrary limits on random things – like how many times can you schedule an alarm during the night. If you go over the limit – boom! No alarm in the morning! That’s what you get for not reading the documentation on vendor modifications (oh wait, there is no documentation).

How to prevent the alarm and sleep tracking from failing? Opt out of the battery savers.

Please also see https://sleep.urbandroid.org/documentation/faq/#qe-faq-1498

For specific Android versions

Android 8 (Oreo)

Android O has brought an option to limit background activity for specific apps. This will break alarms when enabled for Sleep as Android.

Please make sure that System settings > Apps > Sleep > Battery > Background activity is enabled.

For specific phone brands

Huawei

Huawei is one of the most troubled phones on the market, Chinese vendors tend to ignore Android best practices and implement very bizarre custom modifications which make background task nearly impossible to run.

Please do:

  • Phone settings > Advanced Settings > Battery manager > Power plan is set to Performance..
  • Phone Settings > Advanced Settings > Battery Manager > Protected apps – check for Sleep as Android as Protected
  • Phone Settings > Apps > Sleep as Android > Battery > Power-intensive prompt [x] and Keep running after screen off [x]
  • Phone settings >  Apps > ‘Advanced (At the bottom) > Ignore optimisations > Press ‘Allowed’ > All apps > Find Sleep on the list and set to ‘Allow’

If all fails, please try to set the app as device administrator (Sleep as Android > Setting > CAPTCHA > Prevent escaping CAPTCHA). This may also prevent the system from killing sleep tracking.

OnePlus

The app does not usually work on OnePlus phones unless you turn off battery optimizations for Sleep.

System Settings > Apps > Gear Icon > Special Access > Battery Optimization.

On some OnePlus phones there is also a thing called App Auto-Launch which essentially prevents apps working in the background. Please disable it for Sleep.

Also do:

Phone settings > Battery > Battery optimization > switch to the All apps list (Top menu) > Sleep > Don’t optimize

NOTE: Some of our users indicated that you need to disable Doze mode in Developer options.

OnePlus 5 specifically

Disable Settings > Battery > Battery optimization > (three dots) > Enhanced optimization

Samsung Galaxy

  1. S8 (and apparently also some older phones) has introduced a flawed attempt at prolonging battery life called “App power monitor“. For Sleep as Android to work correctly, please whitelist Sleep from App power monitor.How to do it:

    Open the Settings app > Device maintenance > Battery and at the bottom you’ll see a list of your most frequently used apps. You can sleep apps individually or in a group by selecting them then tapping the big SAVE POWER button. Apps that are sleeping will appear in the SLEEPING APPS list at the bottom (tap it to expand the list).

    Scrolling further — all the way to the very bottom — and you’ll find Unmonitored apps. These are apps that you specifically want to exclude (white list) from App power monitor. When inside the Unmonitored apps menu, you can tap the 3-dot menu to add or delete apps from the list.

    Rather than bothering with any of that, you can just turn off the App power monitor feature completely as it has little-to-no impact on battery life and only serves to handicap the normal functioning of your Galaxy phone. It’s excessive and in some cases downright misleading, using scare tactics to keep you reliant on Samsung’s software when other Android devices get by just fine without it.

  2. On other Samsung phones, the path may look like this:
    Phone settings > Applications > Select three dot menu (Top right corner) > Special Access > Optimize Battery usage > Find Sleep on the list and make sure that it is not selected

Xiaomi

Xiaomi are the most troubled phones on the market. Chinese vendors tend to ignore Android best practices and implement very bizarre custom modifications which make background task nearly impossible to run.

The specific steps depend on which version of the MIUI do you have:

  1. Please enable:
    Settings > Advanced Settings > Battery manager > Power plan is set to Performance..
    Device Settings > Advanced Settings > Battery Manager > Protected apps – check for Sleep as Android as Protected
    Device Settings > Apps > Sleep as Android > Battery > Power-intensive prompt [x] and Keep running after screen off [x]..
  2. Settings > Additional Settings > Battery & Performance > Manage apps’ battery usage
    and here:
    1) Switch Power Saving Modes to Off
    2) Choose the next options: Saving Power in The Background > Choose apps > select ‘Sleep’ > Background Settings > No restrictions
  3. Security > Battery > App Battery Saver > Sleep as Android > No restriction
    then enable SaA to autostart in the security center

If all fails, please try to set the app as device administrator (Sleep as Android > Setting > CAPTCHA >Prevent escaping CAPTCHA). This may also prevent the system from killing sleep tracking.

 

Meizu

Meizu are one of the most troubled phones on the market. Chinese vendors tend to ignore Android best practices and implement very bizarre custom modifications which make background task nearly impossible to run.

Please enable:
Settings > Advanced Settings > Battery manager > Power plan is set to Performance..
Device Settings > Advanced Settings > Battery Manager > Protected apps – check for Sleep as Android as Protected
Device Settings > Apps > Sleep as Android > Battery > Power-intensive prompt [x] and Keep running after screen off [x]..

If all fails, please try to set the app as device administrator (Sleep as Android > Setting > CAPTCHA >Prevent escaping CAPTCHA). This may also prevent the system from killing sleep tracking.

Sony

Sony Stamina Mode makes 3rd party alarms not work. There is no workaround from our side, please disable Stamina mode or whitelist our application.

Please go to your Phone settings > Battery > Three dots in the top right corner > Battery optimisation > Apps > Sleep.

Nokia

We are still investigating what we could do with Nokia’s background process limitation. They seem to be currently by far the most restrictive and on Nokia 6 and 8, Sleep is mostly unable to work at all.

HTC

This is a direct citation from HTC’s website

Battery optimization for apps
When you have connections such as Wi‍-Fi on while the phone is in sleep mode, some apps may still continue to use the battery. Starting from Android 6.0, battery optimization is enabled for all apps by default which helps prolong battery standby time when you’re not using the phone.

The phone needs to be sitting idle for an extended period of time before battery optimization takes effect.

Turning battery optimization off in apps
If there are apps that you don’t want battery optimization enabled, you can turn the feature off in those apps.
  1. From the Home screen, tap , and then find and tap Settings.
  2. Tap Power.
  3. Tap Battery optimization.
  4. Tap Not optimized > All apps to see the complete list of apps.
  5. To turn off battery optimization in an app, tap the app name, and then tap Don’t optimize > Done.

    Repeat this process to turn off optimization in other apps.

To filter the list and see which apps have battery optimization disabled, tap All apps > Not optimized.

LG

Phone settings > Battery & power saving > Battery usage > Ignore optimizations > Turn on to ignore battery optimization for Sleep as Android.

 

Share

46 thoughts on “What to do if alarms or sleep tracking don’t work?

  1. Hello,
    I would like to know if the Polar M600 works with Sleep as Android. Few months ago, it was working every time but now evry day it s fail after one hour or much more.
    Can you help me?
    Thank in advance
    Patrice Gailleux

      1. This should be a page stating simply what devices have problematic power saving features and should not be you bashing Chinese phone makers and going on a long rant about bad power saving.

        1. That’s definitely a valid point. However these vendors’ decisions shed a very bad light on us — no user will give negative feedback to the phone makers, everyone will think that the apps themselves are broken, while it’s a firmware fault. That’s something we believe should be communicated so that users get an idea where the trouble comes from.

          1. This page doesn’t seem to be updated. None of those settings are available on my Xiaomi phone running MIUI 9. Maybe it’s time for a revisit to see if these phones have undergone any post-update improvements?

          1. Settings > Apps > Sleep (as Android) > Battery > ensure that ‘close after screen locked’ option is off.
            (I am 95% sure this is the only workable method. )

  2. For Huawei phone, I found a tip for avoiding the app killing : You need to enable the noise record. In 2 months the application was not stopped during the night and the alarm worked all the time (app killed one night on 2 before then tip) 🙂

    1. Come on, it’s just a phone brand. We are not trying to insult you.
      The fact is that a very large portion of support requests that we get is from Huawei phones and in a lot of those, we have actually identified problems that are specific to Huawei as their implementation of some portions of the Android OS is buggy.

  3. I have a Xiaomi Red Mi prime 4.
    I’ll follow the instructions and provide feedback as I have in the past. Just wanted to leave a comment here because I think it’s admirable that you’re going out of your way to inform your users of this situation. Thank you for your continuous support to one of my favorite apps. All the best.

  4. S8 (and apparently also some older phones?should I by phone evere 2 days?even I if had money I wouldnt do it.if your app doenst work on my phone its not bug.

    1. Hello, we are not telling you to buy a new phone. Please read the guide – Samsung has some features (if you prefer to call them so) that clash with the intended use of our app. We are providing a workaround. Samsung has used the battery saving features to better market their phone, but when it comes to real world use, it’s just a badly designed idea.

  5. Oneplus instructions seem to be inaccurate for OP2, there is no “special access” option and searching “Doze” doesn’t return anything. A quick Google seems to indicate that you need developer mode for this.

    1. Hi, we are unable to guarantee precise instructions for a large number of phones. The rule of thumb is to exclude Sleep as Android from any power saving features your phone might have.

      1. I turned off battery savings mode and even restricted battery saving of all the apps , but still my resume note 4 is not tracking sleep . Still show “alarm and sleep tracking may not work in your device”

  6. Interestingly Sony’s Stamina mode can even lead to the internal clock not progressing until I turn the screen on. I’ve whitelisted a bunch of system apps that sounded like they had something to do with time and now it works, but this mode definitely is very powerful. I once tried to have as much battery saving active as possible and tested for a week. My result was that my phone could probably last a full month with one battery cycle. But I wouldn’t be able to do anything with it in that time. I think the Stamina mode should have a warning attached to it, because it is very useful, but can also be destructive.

  7. My alarm works, but works grong, if i set my alarm on 6 o´clock works at 7 o’clock, if i set at 5 o´clock works at 5 o´clock, it´s so rare, i tried diferents combinations in time set, but don´t works normaly, i have a moto g 3

  8. I found your comments about phone brands quite funny :p.
    Thank you for the app !
    (I’m using a Huawei P8 Lite and it works just fine with your instructions)

  9. Hi Jiri!

    Thanks for your guidance on oneplus. Got mine working now.

    Ps. Most people here dont have any idea what they are complaining about… Even taking it on you. Read the article before you start bashing the guy who only tries to help.

  10. I’ve been using this app for a year now and it has helped me tremendously. As someone who is a medicated insomniac, I can truly say it’s amazing to get the advice and the tips. As well as to see how often I move in my sleep and what stage of sleep I stay in most of the time. It gives a lot of great data that my provider and I have been able to use to help improve my insomnia! So thanks for everything you do and the constant changes you are making to the app so that it works for other people and functions better

  11. Recently from 6th of December tracking on my phone has stopped. I sleep for 6-7 hours, however it states I’ve been asleep only a few minutes. I use the one plus 3t, it’s almost been a year, but the tracking is broken since a month. It is highly frustrating. I also use the Mi Band 2, and the wearable app is installed. I’ve shut doze and also Battery optimisation for Sleep. Please sort me out

  12. Are there any other instructions or a tutorial? I’m not sure what i’m doing overall. So far so good. Love what I can do with app. Will buy soon.

Comments are closed.