• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Guide] Notification FIX - Works 100%

Search This thread

c3cilka

Member
Jan 2, 2009
43
4
Because something on my S20 Ultra gets put to sleep that shouldn't, and that is why some of my notifications are delayed. No amount of changing the settings for battery manager make any difference, but disabling Doze does...
I was thinking about the same thing but in a quick research i noticed that Doze works as it should and this is only somekind of misunderstanding between defined specs, apps developers and device manufacturers.

Doze actually should "retain" push notifications, but based on importance. If the notification is flagged as high importance, it will pass Doze without delay (yes, it's simulatable). So the actuall problem is on Samsung side because we don't have option to disable Doze for certain apps (or it should be disabled with "Optimization disabled" option and it doesn't work) but it's probably also partially on App developer's side because we are not able to define how important the notification is for user...

https://developer.android.com/reference/android/app/NotificationChannel#setImportance(int)
 
Last edited:

nounusedname

Member
Sep 9, 2014
6
2
This thread is from 2018. And it's 2020 now and we STILL have to do this to get Gmail notifications instantly, or Doze delays it until you wake the phone lol what a joke.

To people who say just disable Battery Optimization lol. No, it does NOT work. I have tested this and can confirm yes, the Battery Optimization is indeed intended to disable Doze for specific app, by adding the app to a Doze whitelist so Doze ignores it. However this DOES NOT work for Gmail. Even when it is IN the whitelist, Doze for some reason, completely ignores the setting and still drop Gmail notifications until you wake the phone.

Disable Doze visa ADB is the ONLY solution to get Gmail notifications instantly.
 
  • Like
Reactions: kriszg

mazdamiata210

Senior Member
Apr 8, 2012
685
333
Brooklyn, N.Y.
This thread is from 2018. And it's 2020 now and we STILL have to do this to get Gmail notifications instantly, or Doze delays it until you wake the phone lol what a joke.

To people who say just disable Battery Optimization lol. No, it does NOT work. I have tested this and can confirm yes, the Battery Optimization is indeed intended to disable Doze for specific app, by adding the app to a Doze whitelist so Doze ignores it. However this DOES NOT work for Gmail. Even when it is IN the whitelist, Doze for some reason, completely ignores the setting and still drop Gmail notifications until you wake the phone.

Disable Doze visa ADB is the ONLY solution to get Gmail notifications instantly.

Not only Gmail, but others as well that don't work. I use discord and they didn't work no matter how much whitelisting I did.

You are right though the only way to have notifications work 100% of the time is disable doze via adb or root on ANY android phone because doze is a feature baked in by Google and REQUIRED to be on, on top of the other battery optimization tweaks people make to the software
 
  • Like
Reactions: larryk

nounusedname

Member
Sep 9, 2014
6
2
Not only Gmail, but others as well that don't work. I use discord and they didn't work no matter how much whitelisting I did.

You are right though the only way to have notifications work 100% of the time is disable doze via adb or root on ANY android phone because doze is a feature baked in by Google and REQUIRED to be on, on top of the other battery optimization tweaks people make to the software

Thanks for the info on Discord is affected as well. I only use Discord on pc, not on phone so didn't know about this. Was actually considering switching email provider to Outlook or something but if there are other apps affected by this as well then it's pointless to go through the hassle of switching email lol.

I hate Apple, but this is seriously making me consider switching to them as the iOS platform does not have this issue at all.
 

DaRkL3AD3R

Senior Member
Dec 5, 2010
784
240
Just throwing my 2¢ in on this as a Note 8 user running Android Pie. I still have to do this modification in order to get the YourPhone app to properly sync texts and notifications, otherwise it drops connection and doesn't sync anymore. Mind you this is after the YourPhone companion app SPECIFICALLY requests to be whitelisted for battery saving features, so it can stay connected. But nope Google doesn't care, and it still is blocking the app from using data after the phone is idle for 30 minutes. I am so sick and tired of Android and these crappy connection issues. I can't say this will be my last Android phone because frankly what else is there? Apple? Not a chance. Some random Chinese homebrew? Not gonna happen. There's nothing else out there so we're stuck with this garbage. Makes me sick.
 

mazdamiata210

Senior Member
Apr 8, 2012
685
333
Brooklyn, N.Y.
Thanks for the info on Discord is affected as well. I only use Discord on pc, not on phone so didn't know about this. Was actually considering switching email provider to Outlook or something but if there are other apps affected by this as well then it's pointless to go through the hassle of switching email lol.

I hate Apple, but this is seriously making me consider switching to them as the iOS platform does not have this issue at all.

Just throwing my 2¢ in on this as a Note 8 user running Android Pie. I still have to do this modification in order to get the YourPhone app to properly sync texts and notifications, otherwise it drops connection and doesn't sync anymore. Mind you this is after the YourPhone companion app SPECIFICALLY requests to be whitelisted for battery saving features, so it can stay connected. But nope Google doesn't care, and it still is blocking the app from using data after the phone is idle for 30 minutes. I am so sick and tired of Android and these crappy connection issues. I can't say this will be my last Android phone because frankly what else is there? Apple? Not a chance. Some random Chinese homebrew? Not gonna happen. There's nothing else out there so we're stuck with this garbage. Makes me sick.

I've used both iOS and Android and honestly iOS gets a lot of flack but it's really not that bad. I know this is the tinkering community and customizing your phone, but if you want something that just works the way it's intended to do, it does that job. App quality is also much better since Apple controls everything. In no way am I a fanboy of Apple, actually I hate them for what they do most of the time. But what I tell friends, it's the less ****ty choice. People who I've known that were life long Android users switched, and most enjoy iOS now. The biggest difference for them is battery life being much better.
 

DaRkL3AD3R

Senior Member
Dec 5, 2010
784
240
I've used both iOS and Android and honestly iOS gets a lot of flack but it's really not that bad. I know this is the tinkering community and customizing your phone, but if you want something that just works the way it's intended to do, it does that job. App quality is also much better since Apple controls everything. In no way am I a fanboy of Apple, actually I hate them for what they do most of the time. But what I tell friends, it's the less ****ty choice. People who I've known that were life long Android users switched, and most enjoy iOS now. The biggest difference for them is battery life being much better.

Yeah I know a few people who switched to Apple phones and were happier with it. There are things I need to stick with Android for like this YourPhone companion app, as well as the file sharing stuff I use between my PC and phone. I just wish Google would fix this crap so it actually does what it's supposed to instead of brute forcingly ruining app reliability in the name of battery life.
 

mazdamiata210

Senior Member
Apr 8, 2012
685
333
Brooklyn, N.Y.
Yeah I know a few people who switched to Apple phones and were happier with it. There are things I need to stick with Android for like this YourPhone companion app, as well as the file sharing stuff I use between my PC and phone. I just wish Google would fix this crap so it actually does what it's supposed to instead of brute forcingly ruining app reliability in the name of battery life.

Your phone is to get texts and notifications on windows? Also you can use the icloud app on the pc to sync with your icloud storage to your device. They did open up that quite a bit. There is an unofficial work around for texts/imessage on pc but you kinda need to route it through mac and it's a bit of a mess but it does work
 

DaRkL3AD3R

Senior Member
Dec 5, 2010
784
240
Your phone is to get texts and notifications on windows? Also you can use the icloud app on the pc to sync with your icloud storage to your device. They did open up that quite a bit. There is an unofficial work around for texts/imessage on pc but you kinda need to route it through mac and it's a bit of a mess but it does work

Yeah see 1) I am NOT down with installing any Apple garbage on my PC and 2) I don't want to have to deal with any of that workaround crap. The current situation for Android is just have to run this adb command whenever I restart my phone and that's it, good to go. I'm really not down with Apple or their garbage software, and I certainly don't want any of it on my PC. I'm just going to have to weather the storm for the time being. Maybe eventually when I upgrade to a Note 21 or 22 or something things will be in a better situation. But I doubt it lol
 

makavelix9

New member
Mar 25, 2019
1
0
This works 100% on my new samsung. I was getting annoyed with Gmail notifications not coming through whilst in standby. So with the script every morning and a 3rd party mail app i have no problems now.

I don't know why we cant disable doze in the built in menus such as battery optimisation but it's better than nothing.

Sometimes even if the phone is unlocked i wont get the email until I refresh the mail app. Only does this on my wifi, why ?
 
Last edited:

sunnyfunny

New member
Mar 5, 2011
2
0
Hi,
i have a the Oneplus 6. Since 2-3 days i have the problem that notification with WLAN enable not working. My handy got no push notifications (Whaatsapp, Telegram, Coin Master or what ever). When i use mobil data everthink works fine.
The workaround from the first post does not work for me :(

Sorry for my bad english. I'm german nativ speaker
 

kd276

Senior Member
Jun 14, 2021
317
63
Hello, unfortunately i'm having this issue too, once my phone screen is off my sms notification do not appears anymore, or better appear even 3-4 hours later, is all random, they appear instantly only when i wake up the phone, the app is completely frozen in background, no matter what.
I'm on Xiaomi POCO X3 Pro with ArrowOS custom rom, but don't matter since fo what i understand is an issue with the android os core, so i'm wondering if this zipped magisk module is safe to use on my phone or is only tested for onesplus devices?

edit
Solved the issue using the whitelist and add the two apps i have issues with:

adb shell dumpsys deviceidle whitelist +com.android.messaging
adb shell dumpsys deviceidle whitelist +com.android.deskclock

Change is permanent so you can use this only once. Of course battery optimization should be turned off completely. Works flawlessly for me.
 
Last edited:
  • Like
Reactions: nikosrs4 and kriszg

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    So if you are having issues with notifications not coming in or coming in late this is finally how to fix it 100% on every app. It seems to have a very slight impact on battery but nothing major. From what I saw it was about 1% per hour drain... Which is worth it for a working phone

    Anyways, the way to fix this requires it to be set from a computer on every restart of the phone which is probably the biggest problem with this method. I'm working on a way to maybe have a script run at every start up to fix the issue. Which will probably require root. We'll see...

    1. Download and install the ADB drivers - Follow the guide here: https://www.xda-developers.com/install-adb-windows-macos-linux/

    2. Once you have ADB installed and enabled on your phone like the guide says in step 1 above, you want to be on the ADB command prompt...

    Type in the command:

    Code:
    adb shell dumpsys deviceidle disable

    The command prompt should return with:

    Code:
    Deep idle mode disabled
    Light idle mode disabled

    That's it! Now your notifications will work fine. I've tested this for a day and every notification came through on time.

    Just like to add that I have adaptive battery off, and every app is set to optimize. Not sure if this makes a difference or not.

    Again this must be applied on every restart (which sucks) but at least it's something, for now.
    6
    All right! Can anybody test the magisk module i make? All i do is patch the command into magisk module and this module does is that automatically disable deep idle doze on every boot so you don't has to manually do it on terminal or tasker... I been test it a little bit and seem everything work fine...let me know how it work for you! Also i suggested that you disable adaptive optimize for best!
    Credit to OP for founding the command!
    4
    I have issues with notifications not notifying me until I wake up my phone
    3
    So if you are having issues with notifications not coming in or coming in late this is finally how to fix it 100% on every app. It seems to have a very slight impact on battery but nothing major. From what I saw it was about 1% per hour drain... Which is worth it for a working phone

    Anyways, the way to fix this requires it to be set from a computer on every restart of the phone which is probably the biggest problem with this method. I'm working on a way to maybe have a script run at every start up to fix the issue. Which will probably require root. We'll see...

    1. Download and install the ADB drivers - Follow the guide here: https://www.xda-developers.com/install-adb-windows-macos-linux/

    2. Once you have ADB installed and enabled on your phone like the guide says in step 1 above, you want to be on the ADB command prompt...

    Type in the command:

    Code:
    adb shell dumpsys deviceidle disable

    The command prompt should return with:

    Code:
    Deep idle mode disabled
    Light idle mode disabled

    That's it! Now your notifications will work fine. I've tested this for a day and every notification came through on time.

    Just like to add that I have adaptive battery off, and every app is set to optimize. Not sure if this makes a difference or not.

    Again this must be applied on every restart (which sucks) but at least it's something, for now.

    You can create a script with the command on SManager "Root required", set script on boot. I will run the command above at every boot.
    2
    What notification problems are there?

    "if you are having issues with notifications not coming in or coming in late"