Managing Doze Mode - when calls come in on cell, go to voicemail or missed and phone is sleeping


Updated 1/14/2019 to include a downloadable Alternative method

People with adequate WiFi but poor cell service can find their incoming calls going to voice mail if their phone has been sleeping for a while. This happens because after sleeping for an hour or more the Doze function puts apps to sleep. When a call comes in RW attempts to awaken the phone but it doesn’t wake up fast enough to reply to RW’s interrogation. RW sends the call to cell but if cell service is unavailable the call goes to voicemail.

Here are a couple of work-arounds for the problem:

MacroDroid is the easiest way to automate your daily tasks on your Android smartphone or tablet. Via the smart user interface MacroDroid offers a simple solution to make automated tasks on your device in just a few taps.MacroDroid helps you by automating the activities you did manually before, and customize them in a way you want it to work for you, many of these were high lighted in the Community Challenge 5: MacroDroid Automations

Original Method to Manage Doze

  1. Go to the Play store and install the free Macrodroid app:

The macro turns the screen on every 50 minutes preventing the phone from entering the Doze mode. This will drain the battery a little faster depending on one’s display settings. The app can be turned on and off with a simple toggle.

Turning the screen off immediately after turning it on can extend the battery life BUT on Samsung phones this forces you to use a PIN instead of the fingerprint sensor on your next access. On my S7 I deleted this step and let the screen turn off by itself.

It is quite likely this work-around will also fix a problem where WiFi disconnects in Doze which, in turn, causes the phone to use cellular data (if LTE service is available) while connected to WiFi. That problem can also be fixed by toggling WiFi off and back on again but the Macrodroid work-around makes that unnecessary.

There is a lengthy discussion regarding this problem here: Are your calls coming in on Cell or going to voicemail when your phone is sleeping?

Alternative Method to Manage Doze

Some devices and later levels of OS have shown to use a different interval of time before Doze turns off the WiFi made it was necessary to take a different approach. This combined with the major improvements in the Connectivity Status Notifications resulted in the following

The latest iteration has been uploaded and it is available to anyone as a Template and prevents you from having to build it yourself .

  • Download and Open MacroDroid
  • Select Templates (center left grey) Home Screen
  • Search Doze RW (current version is labeled 0.9.2 and valid for 3.0 RW App and higher)
  • Once located TAP the Macro, then hit the Plus to save local on your phone .
    • Ensure it is toggled on (not greyed out). :dots: Menu Top right, also provides Enable/Disable.

Changes this iteration:

Due to the occasional failure that required the screen to be turned on and let time out, it is now turned on, and then when the 2nd RW Notification (which should be On WiFi) is detected the display is turned off to conserve battery life

Getting “Voice calls only” and using huge, unintended amounts of Cell Data
Voice Calls Only message that goes away after password entry
Community Challenge 5: MacroDroid Automations
Inbound cellular calls go straight to voice mail new moto g6
Wifi connected, says I have emergency call only... it calls out and takes calls in but not always
Inbound calls come in on Cell instead of wifi
Are your calls coming in on Cell or going to voicemail when your phone is sleeping?
Is Republic still WiFi first?

ETA 10/12/18
Important note: There have been major changes to RW’s code and notifications … see this update near the end for the latest ‘fix’ … and remember there is no one way to fix this problem as different phones and code levels have resulted in a moving target

I began having problems (with the above program) on my Moto X Pure, and began playing with an alternative ‘fix’
I just uploaded my latest iteration to the Templates in MacroDroid to reflect my latest attempt.

  • These can be found by searching for Doze RW in the Templates
  • On my Moto X over the last 48 hour period of testing I have not seen any failures.
    • I only tested on a Moto X, but if anyone would like to download and test the two programs it would be greatly appreciated

Current iteration takes two different programs, one for the detection of the RW Notification ‘Something’ and the second to detect when it’s ‘On WiFi’ and connected to an SSID (also log the signal level at that time)


I just created that macro and will let you know how it works on my S7. All of my S7 power settings are at the factory defaults subsequent to a factory reset and the upgrade to Android O.


@jben here are my 18 log entries (9 disconnects/reconnects) after running for 20 hours.


Wow, there goes everything I thought I understood about Doze and MacroDroid

  • I have usually seen my MXP go into Doze into ~58 mins, but occasionally it would be much shorter
    • As shown in the annotated screenshot , there went that theory :frowning:
  • From Androids doc, this time can the double, double … 1 hour, if nothing is queued at the device level, next period is 2 hours, then if nothing queued next period is 4 hours etc
  • I assume these 2 were the only MacroDroid apps running?
  • The ‘REP app notification’, I assume that is your shorthand for the actual user log to conserve space?

And the real question did your device remain awake on WiFi?


Yes, REP app is short for “log any new notifications from Republic app.” Thanks for adding the time between disconnects and yes, that blows my mind.

It appears to me that setting the brightness to auto wakes the phone back up causing the Republic app to reconnect. You should know that throughout this 20 hour interval my S7 was sitting on its wireless charger. If it isn’t supposed to go into Doze when on the charger then something else is causing it to lose its WiFi connection.

No, I wasn’t looking at the phone when any of these events occurred. I do look at it from time-to-time to see if there are any new notifications on the sleep screen. I didn’t see a hollow arc during this period by only takes one notification to push the Republic app notification out of my view.


@jben it just dawned on me that I was logging any notification so I changed the macro to display the notification text. Maybe tomorrow we will have better information. My marginal cell coverage changes from from connected to a band 12 tower to not connected at all, to connected to an AT&T tower and maybe the Republic app is noticing these changes.


@BillG and I will continue to test and make notes of the differences we see in the running of these programs. Anyone else is more than welcome to join in

  • Download MacroDroid from Google Play, access the Template section and load the two programs, Doze Recovery RW 1 & Doze Recovery RW 2
    • These can be found by searching for Doze RW in the Templates (currently dated Aug 1)
  • As you provide feedback, it will be analyzed and attempts will be made to adjust the Template program to accommodate any differences .


Create a program to help mitigate the problems that are being attributed to Doze, and your participation and help would be greatly appreciated.



For those less tech savvy who might like to dl & test would you please provide more detail. I got as far as finding the templates. Went trough permissions to add 1 of 2. Now I have two macros.

Communication (1) – Doze Recovery 1 of 2

Data Connection (1) – Wake Wi-FI

Do I disable the previous macro? Thanks.



  • Download and Open MacroDroid
  • Select Templates from center left (grey) home screen
  • Tap Latest
  • Search Doze RW
    • Download Doze Recovery RW 1 of 2
    • Download Doze Recovery RW 2 of 2
      • Both indicate @jben Uploaded Aug 1 and will be in the Communication section, grant permissions as requested… Only these two should be loaded or enabled for this function. Don’t have any others running that monitor the Republic App
        Here is screenshot of them installed and turned on


  • Just received an update to the MD App … so always download the latest
  • I set the MD Settings to Ignore Battery optimizations (as that is what were trying to manage)


I configured MacroDroid (MD) to log every Republic App notification. I cleared the MD log and set the phone on my wireless charger for several hours. As you can see, the phone is not sleeping but the wireless charger is interfering with the WiFi connection:

Then I took the phone off the charger overnight. Here is a small sample of the Republic app notifications:

As you can see, ;when charging the phone doesn’t sleep but it seems the wireless charger interferes with the WiFi connection causing the same symptom. Thank you RW for making the notifications more meaningful. I’ve cleared the log and connected the phone to a wired charger. I’ll post the log here later. If there are no disconnects we will know the wireless charger is one culprit.

OK, there were no disconnect notifications when connected to the stock turbo charger instead of the wireless charger.


For this test all I’m doing is logging notifications from the Republic app with the phone not plugged in. I am not trying to defeat the doze mode. Event 1 is a spam call. Event 2 is a call from my home phone when I noticed a hollow are notification on my phone’s sleep screen. That call rang the beta copy of Anywhere on my PC 4 times before finally ringing the phone. I was holding the phone and answered immediately.

In this case the incoming call was able to awaken my sleeping phone but that took 5 rings.

Notice that in between the two events there were several times when the WiFi connection was put to sleep. Each of those has a companion entry where it appears the phone is awake. I don’t understand that. Why would it go to sleep and then wake up? I’m not doing anything with the phone during this interval.


In earlier testing I’ve learned that some missed calls are caused by my wireless charging stand which interferes with the WiFi connection. I’ve also learned that Doze mode doesn’t occur at regular intervals and it doesn’t occur at all when the phone is plugged into the charger… Improvements to the Republic Wireless app have made their notification more meaningful. The Macrodroid app can log these notifications.

One of the benefits brought to my S7 by the upgrade to Android O is a persistent sleep screen that continuously displays the Republic Wireless arc status. For the next test I turned Macrodroid off and kept an eye on the sleep screen. Over a period about 4 hours and again this morning I watched for a hollow Republic arc indicating my phone was in the sleep state. Each time I saw that it was sleeping I called it from my land line and to my surprise every call was successful. Kudos to RW for managing to wake the phone in time to get those calls.

While I was doing this I had the beta Anywhere running on my desktop. It rings when a call comes into my number. It usually rings before the phone does because RW is busy waking my phone up. I counted these rings to get a rough idea as to how long the wake-up process takes. Here are the n;umber of rings heard on Anywhere before the ring to the phone:


Most of these test calls came in on WiFi.

I don’t know if the speed of the phone contributes to a successful ring-through and I don’t yet know how many rings will occur before RW gives up and sends the call the voice mail. It is possible a phone that was slower than the S7 would not ring at all on those first two calls.

Today I’m going to make test calls but let them go to voice mail. I’ll count the number of rings so we can get an idea of how long RW will persist in trying to wake up the phone. After a few calls I’ll edit this post to add that information.


Great information,
I wonder if the Call History in the Accounts indicate the call was Cell or WiFi? (normal error recovery is to check the RW server for an active VoIP/WiFi connection, if it’s not present they then revert to cell) the Italics info is provided for others that may be reading :wink:



I just made another test call and verified that the phone displays “Republic Network” for the incoming call. Doesn’t that mean the call is coming in on WiFi or has this changed? I checked my account and it shows the call coming in on cell.


Republic Network means wifi (or it is supposed to).


Thanks @louisdi, that is what I thought. I don’t recall seeing any incoming calls marked during this round of testing but the Account log shows several. I watched the phone for the duration if the call and it did not switch from WiFi to cell.


@louisdi I put my phone in airplane mode, turned WiFi back on, waited for a hollow arc, called my phone and it came in on WiFi (of course) but my account log shows it coming in on cell. I think this proves the account log is not accurate in this respect.


I just tested my Moto X Pure, put in Airplane Mode, reconnected WiFi then made a outgoing and answered an incoming … both show as WiFi in the account log, but the RW App shows an Open Arch in the Status line and the Notification shows ‘Airplane Mode’ Not connected to the cellular network … so it appears that there has been some changes to the app that I am not familiar with
(am at the latest RW App level


My republic app is