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.
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 126.96.36.199
- 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.
- The macro code does not work with 5.0 Phones … no RW App to drive triggers
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’
Click for details
Triggers … The following 3 are used in the macro
- 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)
- 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.)
- Power is Connected
(This is used to zero the counter, primarily for debugging)
- Republic On WiFi Notification is ‘ Cleared ’
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.
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.
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.
Action 3 is started when Trigger 3 is ‘true’
This simply sets the count back to zero
- Action 1 is started when Trigger 1 is ‘true’
Click thumbnail below to see full image
Download from the Play Store and Open the free MacroDroid
Select Templates (1) from MD’s Home Screen
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
- Locate the latest iteration, 0.9.7.8 , which is valid for use with 3.0 RW App releases up to and including Version 188.8.131.52 (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
- 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
- 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
- Make this macro:
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.
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.
- Here is a graphic to show what could work for the install (afik the Extend Home does not have an USB port)