Managing Doze Mode - (While on WiFi) calls arrive via cell | calls go to voicemail | calls are missed

The Android Doze problem will only be experienced by phones on Android 6.0 and above and will not occur when the device is on the charger

  • Users with adequate WiFi, but marginal cell service, can find their incoming calls going to voicemail if their phone has been sleeping for a short period of time. This happens because after sleeping for a period of time (varies 2-60 mins), the Android Doze function turns off WiFi transmit and receivers to conserve battery. When the phone is in Doze and a call comes in, RW will try to wake the phone with Googles Firebase Cloud Messaging via the Cell service, if it doesn’t wake up fast enough to connect the call via the Internet they then send the call via cell … but if cell service is unavailable the call goes to voicemail.

Current work around’s that function with the free version of MacroDroid

Latest Method to Manage Doze, published and supported by @jBen Ambassador

  • Different devices and later levels of OS have been found to use a different interval of time before Doze turns off the WiFi, this made it necessary to take a different approach. This combined with the major improvements in the Connectivity Status Notifications and subsequent improvements resulted in the following
  • Previous versions became obsolete with Republic’s App ver 3.28.2.1
    • I have been working on alternatives and testing since (6/14/2020) and the **latest (0.9.7.8) was uploaded to MacroDroid on May 14, 2021, and is available as a downloadable Template to prevent you from having to build it yourself.

Note:

  • The macro code doesn’t provide the ability to function properly if a phone is locked, this is a limitation imposed by Android and is documented by the Macroidroid author.
    • Success will vary by phone, as my testing is limited … (Moto X4 ok 100%, Galaxy 20 Ultra fails 100%), therefore I have left the code in, and invite feedback from users.
  • The macro does not function properly if you have your phone in Airplane Mode and have turned WiFi back on because Google will not update the Status to ‘On WiFi’

Doze Detection Methodology

Click for details
  • Triggers … The following 3 are used in the macro
    1. Republic On WiFi Notification is ‘ Cleared
      (Android Doze period starts, the phone’s WiFi is disabled and the RW Arc is removed, as there is no longer any communication between phones WiFi and Republic)
    2. Republic On WiFi Notification is ‘ Received
      (This will not be posted until the WiFi connection that supports ‘Calls, SMS & MMS texting’ or ‘Calls over cell, messages, and data over WiFi’, is fully established.)
    3. Power is Connected
      (This is used to zero the counter, primarily for debugging)

Note: These 3 Triggers will only be acted on if the ‘Conditions’ are met, as Doze is never invoked by Android if the device is on the charger or a call is in progress

  • Actions … Each Trigger has a corresponding ‘Action’ that are contained between the If and End If statements … every time a ‘Trigger’ occurs, the code will run thru the available ‘Actions’ and initiate the appropriate Actions.
    1. Action 1 is started when Trigger 1 is ‘true’
      The macro will unlock the device (attempt), turn on the Screen (which kills Doze) and log the event.
    2. Action 2 is started when Trigger 2 is ‘true’
      The Republic code can again establish communication and post the ‘On WiFi’ solid Arc, bump the counter, lock the device (attempt) and log the event.
    3. Action 3 is started when Trigger 3 is ‘true’
      This simply sets the count back to zero

Click thumbnail below to see full image


Download instructions

  1. Download from the Play Store and Open the free MacroDroid

  2. Select Templates (1) from MD’s Home Screen

  3. Using the Spotlight (1) Search for “Doze” in Templates (2)

  • The content seen will vary from the screenshot, as new templates are uploaded by users all the time

  1. Locate the latest iteration, 0.9.7.8 , which is valid for use with 3.0 RW App releases up to and including Version 3.30.3.13 (retested 10/xx-11/21 on X4 & Samsung Galaxy 20)
  • Once located TAP the Macro, then hit the Plus (2) (bottom right) to save local on your phone .

  • This will put it in the Macros section of the Home page

  1. Select the Macro tab (3) at the bottom of Home page, and check it is toggled as shown (4) & (5)
    Never enable 0.9.7.8 Doze Detect & Event Logging at the same time

Note: If this doesn’t work for you, it would be helpful if you could provide some feedback, either as a Comment or DM to me @jBen

  • Which Phone & OS level
  • Your description of the problem encountered.
  • Screenshot of the last couple pages of User Logs
    • Logs are accessible from the MacroDroid App / Home page / User Logs

Published Method KISS-30 as requested by @FreddyP

  • A simple time-based method derived from the DIY one by @BillG and set to 30 minutes, with the instructions on how to change the time if desired
    • Use the download instructions above, except step 4 would be KISS-30


Original Method to Manage Doze by @billg

  1. Go to the Play store and install the free Macrodroid app:
  • NOTE: The Republic Wireless App and MacroDroid apps should NOT be Optimized
    • (under Battery Optimization in the Android settings), use the search function to find as different versions of the OS seem to hide things differently

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.


Updated 12/16/2020

This discussion has once again been ‘trimmed’ to just contain the original and latest iteration of the available fix. It is readily admitted that this does not ‘fix’ all the problems that users may encounter when the WiFi is disabled by Doze (an Android function), but it has been a help to some

  • If you try this and it doesn’t work for you, please provide feedback via a comment or DM to @jben, so we can understand how the problem manifests itself in your environment

Updated 11/16/20 - Optional solution to this problem is installing RW’s Extend Home. Then you can just let the phone go to sleep or, for that matter, turn it off. @billg connected his Extend Home to his home phone system with remotes located around my home.

  • Added 1/5/2021: As @BillG’s home phone system didn’t have Ethernet nearby but had good Wifi, he added this low-cost Wireless WiFi Lan Adapter
    Excellent solution for those who want/needs the Extend Home adapter somewhere other than the closet their router is in and are unable to run an Ethernet cable.
5 Likes
Phone doesn't ring on my end
Getting just outline of RW arc often
Community Challenge 5: MacroDroid Automations
I'm at home, wireless is working, wireless is enabled on my phone. Why is my phone using cell data?
G6 Sim card error
Some calls on my Moto G6 go to voicemail too quickly
Phone rings once or not at all, and goes straight to voicemail
Phone doesn't ring every time, many calls go directly to voicemail
Extender phone rings, cell does not ring
Phone often does not ring - @home with wifi & weak cell signal
Plan 2.0 refund problem
Phone often does not ring - @home with wifi & weak cell signal
Minimize Disconnect Time When Moving between WiFi Access Points
Poor experience with strong wi-fi and weak cellular service
Phone displays "No Network Available" after most recent RW App update
Phone displays "No Network Available" after most recent RW App update
"No Network Connection" on lock screen; building a solution with Macrodroid?
"No Network Connection" on lock screen; building a solution with Macrodroid?
Phone displays "No Network Available" after most recent RW App update
Phone displays "No Network Available" after most recent RW App update
Phone displays "No Network Available" after most recent RW App update
Stubborn backlight on Moto Z Play
Google Messages for Web - Can't send texts when phone is asleep in Doze mode
Battery Draining Because Can't Stay Connected to Wifi
Not receiving calls over wifi in Canada
Did You Know About These Handy Data Protection Tools?
Could RW app deal with Android doze mode?
Calls going to voicemail
Staying on the internet
Calls from one caller go straight to voicemail
Inbound calls come in on Cell instead of wifi
Moto G Power Calls Going to Voicemail
Phone doesn't ring, goes straight to voicemail
When is Republic ever going to address Android Doze on their service?
Samsung J3 sometimes goes straight to voicemail
Calls go straight to voicemail Moto E6
Diagnostic test help please
Mobile Data Turned on and WiFi Turned Off AutoMagically
Android pi wifi sleep issues?
Why does my data switch from Wi-Fi to cell
G5s Plus Mobile WiFi drop solved
Moto X4 Compatible
Android pi wifi sleep issues?
Android pi wifi sleep issues?
Android pi wifi sleep issues?
Incoming calls go into Voicemail (calls do not ring) on Moto G3
Doze Detect & keeping RW Awake to take Calls
Moto G5 Plus System Updates?
Some incoming calls go straight to voicemail
My phone decides when it wants to ring
Moto X4, phone will not ring part of the time
Calls going straight to voicemail in last few weeks
Is MacroDroid Still a Thing?
Phone rings once or not at all, and goes straight to voicemail
Phone rings once or not at all, and goes straight to voicemail

A post was split to a new topic: Calls going straight to voicemail in last few weeks

8 posts were split to a new topic: Deep dive into the Macrodroid Macro to overcome Doze Mode based on RW status notifications

Macro by jBen has been tested on Version 3.29.2.1 with no changes since 0.9.7.7 was uploaded to MacroDroid on Feb 4, 2021

1 Like

I just switched to your April 2021 updated version. Since last update to RW app, I’ve been having issues with Doze again.

  • Today (5/15/2021) I pushed a new release 0.9.7.8
    • Reason: Based on feedback in the Macrodroid Forum I found that the method I had used (multiple IF statements to detect which trigger fired it and the actions needed) should have utilized the IF ELSE structure as it is more proficient internally.
  • I have tested for a couple of days, and the basic functions do not seem to be affected, however, any user feedback would be appreciated.
    • I have also highlighted the note regarding the failures to be expected on some devices if you use any Screen Lock function.
    • I will update the document to reflect the changes, but there will be some delay due to health issues
2 Likes

So, I had given up using the Marco because it didn’t work and was causing issues with my lock screen (basically I’d have to unlock my phone twice to get in). Is that still an issue with the latest version? Unfortunately I use my phone for work and they require the lock for security purposes.

Also, the lock is good with young children so they aren’t using the devices without permission.

Yes, the problem will still exist … to explain this, the Android code prevents the MacroDroid from functioning properly. This is documented in the write-up in Tips and Tricks. Interestingly enough it works 100% of the time on my Moto X4 and fails 100% of the time on a Samsung Galaxy 20 … so apparently, there is some wiggle room for the manufactures.
I tried to circumvent it by using location, but that failed as well. If users postback which phones work/fails for them I can add to the wright-up.

Samsung Galaxy S10e over here. Doesn’t work for me due to the lock. I will try the latest version later just to verify, but the last version didn’t work. Now I did get an Android system update since then as well so that might factor in (for good or ill).

1 Like
  • I have completed testing against the latest Republic Wireless App 3.29.3.4 and have found no change in behaviors.
    • If you utilize a screen lock, it is looking like it is not going to work (and the developer of Macrodroid has confirmed that due to Android Code restriction, there is nothing he can ‘fix’.)

Thanks for following up! Anyone know if there is a workaround to the lock? Is there a different type of lock that could be used? This wouldn’t help me as I need the lock for compliance with my employer’s security through Microsoft. That being said, if there was a way to lock the screen to prevent young children from accessing the phone without permission, that would probably be helpful to others!

I will post what I know … my testing is still very limited and could use the help and feedback from other users

  • Success will vary by phone, as my testing is limited … (Moto X4 ok 100%, Galaxy 20 Ultra fails 100%) , therefore I have left the code in, and invite feedback from users.

After nearly two years of dealing with Doze on RW phones, I’m at my wits end. I’ve tried multiple macros. I’ve tried modifying macros. I’ve tried different phones. Still, my wife and I miss calls on a regular basis.

Background: 100% wifi at home, as we have no cell signal at all. A complete dead zone. Even moving outside yields a weak signal…at best…not useable.

I just don’t know what to do. Right now, I have a “dumb” macro that wakes up our phones every 30 minutes. Is that working? No idea, as I don’t know when Doze will be enabled next.

No action required; just frustrated. I specifically chose RW due to its WiFi calling technology, which is exactly what I need. I’ll keep poking at this. Can I move to another provider? Nope…nobody has a decent signal in my area.

Cheers

ps - I realize that Doze is an Android thing, not a RW thing, and there’s nothing you can do on your end, which makes it even more frustrating!

I feel your frustrations … having spent 100’s of hours developing and testing my latest published ‘fix’ 0.9.7.8 which can be found in the Managing Doze Mode - (While on WiFi) calls arrive via cell | calls go to voicemail | calls are missed
It is not a cure all, however it appears to function ok. The time that a phone is not in Doze mode varies by manufacture.
Give it a try and let me know the results good or bad

1 Like

@jben,
Thanks for your efforts on this issue. I’ve tried your macros, with limited success. By that I mean that calls are missed, so the macro is not 100% effective. I need all my calls to come thru.

1 Like

As I tried to outline in my Tips & Tricks, it is not 100%, however, on the 2 phones I have, it manages to come out of Doze within 1-3 seconds. Still, the only way you can kill Doze is to keep your phone on the charger.

1 Like

I fully appreciate this won’t help if the answer is no, however, did you try Republic’s Extend Home adapter when it was available?

3 Likes

I have the extend home Doesn’t help when I’m down by the pool. Also, we have two phone with this issue. Extend home is only tied to one number.

Now android is randomly telling me I can’t be in airplane mode if I want to make a call. Really?

I have finished testing 0.9.7.8, the latest published MacroDroid workaround against Republic Wireless’s latest version of their user app 3.30.2.2 on the two phones I have (a Moto X4 and a Samsung Galaxy S20 Ultra)

1 Like
Message an
Expert customer