Push Notification Issues

  1. masi0
    Gingerbread Feb 22, 2017

    masi0 , Feb 22, 2017 :
    Firstly, the issue is related to aggressive battery savings and the solution to receive notifications from apps of your choice is to ensure they are excluded from the battery optimization. It works for all apps except GMail which is a system app and its not possible to make changes for it.

    The only solution would be if OnePlus developers would either include GMail as part of apps that can be optimized or move the app from /system to /data partition.

  2. rolapinou
    Eclair Feb 23, 2017

    rolapinou , Feb 23, 2017 :
    Just to be sure of something about aggressive battery saving
    Do we agree that with my settings on the screenshot below, it is like none of my applications are optimised ?


    For example, Whatsapp is not explicitely in the "white list" on the top but, as the global setting is unchecked, I understood that agressive doze & app hibernation is disabled for all and every app (that are in the list, where Gmail is missing).
    Do we agree on that ?

    Thanks for the help

  3. fonfano
    Cupcake Mar 13, 2017

    fonfano , Mar 13, 2017 :
    I created an account to tell you that I had the delayed email issue with my Sony Xperia Z3 since I updated to Marshmallow (Android 6, Sony official). Sometimes 2 hours to have an email. I was CRYING everyday...

    I even tried Outlook for android with a fresh outlook.fr account : Not working, even if google has nothing to deal with.

    I allready turned as "not optimized" my apps (gmail...) but that was not working

    So I did that :
    - As described in the post of JasonMR at the end of the page 107 of this thread : download 2 softwares (1 in Windows, 1 in phone) then phone into debug mode and dev mode + script ADB in Windows + script on the phone with sh script runner (who returned OK)
    At this point it was not working
    - So i turned as "not optimized" in setting/battery/3 dots/battery optimization absolutely everythings : all apps, and about 150 more things look like "processes" in third tab.

    And IT WORKS now, I receive 99% of my emails in 2-3 secondes. And i have noticed no battery problem at all.

    Thank you to JasonMR !

    I come back : It worked very fine during 5 whole days, and now I have delay problem again !

    I want to die...

    Last edited: Mar 15, 2017

  4. PhilThinks
    Cupcake May 12, 2017

    PhilThinks , May 12, 2017 :
    I am also experiencing issues with push notifications on my OnePlus 3T (OOS 4.1.3):
    Whenever I disconnect from WiFi, I stop receiving push notifications, and then when I reconnect to WiFi at home or work, I will suddenly receive notifications for everything all at once. Alternatively, if I open one of the impacted apps while on LTE/not on WiFi, the app will refresh and pull unread messages, but I must *manually* do so, which means I'm basically unreachable via internet messaging, making my phone much less useful.

    Apps that I've noticed are impacted include Gmail, Hangouts, Snapchat, Facebook Messenger, and Lyft, but *not* SMS/text messages or phone calls.

    - Notifications setting is "All apps are allowed to send".
    - Doze Mode is off.
    - Developer Settings is off.
    - Battery Optimization is off for all apps.
    - I have deleted application cache.
    - I reset app preferences (which clears app defaults, extra permissions, notification changes, disabled apps, etc.).
    - I reset APN settings.

    I still do not receive push notifications. Any thoughts on why this is happening?

  5. Agosh
    Donut May 13, 2017

    Agosh , May 13, 2017 :
    Wipe data, you have to reinstall os

  6. Danilson
    Cupcake Jun 9, 2017

    Danilson , Jun 9, 2017 :
    Hello everyone,
    I am also experiencing this problem. 2 minutes after turning off my screen the oneplus doesn't receive any more Push notifications. Is there now a solution for this issue?
    I started reading in this forum but there are 121 pages.. It would be very appreciate if someone could give a quick summary if there is anything that actually works. I already excluded for example WhatsApp from the battery optimization like it is suggested on this last page but still I don't get WhatsApp notifications. The notifications for it are turned in the App. I'm using a Oneplus X with Oxygen OS 3.1.4 and Android 6.0.1
    Thank you so much to everyone who is willing to give me an Update on this issue.

  7. Custnam
    Gingerbread Aug 5, 2017

    Custnam , Aug 5, 2017 :
    Hello everyone. Same issue here. I did find a way to get Gmail not battery optimized despite it not being on the list, but this did not fix the issue for me. As others have said the only thing that works is turning doze off completely. I really hope they fix this because it sucks not having the battery savings of Doze.

  8. ezmaverick
    Cupcake Sep 10, 2017

    ezmaverick , Sep 10, 2017 :
    Settings >> Advanced >> Recent App Management >> Normal Clear Checked
    and problem solved for all apps (Instagram, Hangout, etc.)

  9. fonfano
    Cupcake Sep 21, 2017

    fonfano , Sep 21, 2017 :

    I don't find it in the settings (there is not advanced in settings) (Sony Xpéria Z3 with android 6)
    Last edited: Sep 21, 2017

  10. alan_helper
    Cupcake Sep 27, 2017

    alan_helper , Sep 27, 2017 :
    Im right here only for post help
    Yes, doze. But you post didnt work

    (You need to pre-install adb tools on windows pc)


    The solution is here https://forum.xda-developers.com/showpost.php?p=73451528&postcount=2

    Change Doze (deviceidle) settings

    On the device you can change the Doze settings very easy. First list the Doze settings to get all current parameters:

    Then change parameters by setting some variables in the Android Global Settings db:

    Enable light doze too (mLightEnabled=true mDeepEnabled=true)

    Add whatsapp and gmail to the whitelist

    Last edited: Oct 24, 2017

  11. fonfano
    Cupcake Sep 28, 2017

    fonfano , Sep 28, 2017 :
    Hello alan helper, thank you for your help

    I have started following your steps and at "settings put global Phenotype_flags device_idle_constants" I have permission denial : Do not have permission.

    (I do it with SH Script Runner)

    I'm back : OK I selected Superuser button and then no error no more.

    I did everything you told, then wait and see !

    Do I have to reboot ? Or do I need to do it every time I reboot my phone ? (It is not a problem because I restart it 2 times a year !)

    Thank you for this help !

    I'm back : It seems to work fine for 10 days now.

    If you want to find your other apps you have to enter that in SH Script Runner (or other) for example for ebay :

    pm list packages | grep ebay

    I'm back again : I have noticed a little more battery consumption, about 20%, but it works !
    Last edited: Oct 11, 2017

  12. fonfano
    Cupcake Jan 12, 2018

  13. mmo2
    Cupcake Mar 7, 2018

    mmo2 , Mar 7, 2018 :
    I checked the same on multiple apps i have on my phone.
    The problem is that many apps rely heavily on push notification for proper working like security and fitness apps as they use reminders and waking up to check.

    In my case, most of the apps I tried could not work, but finally found few that would:
    - Security apps to hide and protect gallery lock - app lock
    - Fitness Tracker (Diet & Workouts) app for fast weight loss
    - Gym Workout & Bodybuilding App with Videos
    - Weight Loss Healthy Recipes

    For most other apps, they are not working for reminders. Even from the above, sometimes they have issues too for notifications, but i have tried my best, and other apps won't even work a bit for reminders on my one plus phone and i need to make it worth it to make the money i spent.

  14. fonfano
    Cupcake Mar 23, 2018

    fonfano , Mar 23, 2018 :
    Hi guys I'm back with a new phone with oreo, noticing that this morning the phone didn't sounded on test emails, and no led blinking either. I woke up it and saw immediately the emails. They was for sure already arrived but the phone didn't sounded. Maybe the phone "knew" I was sleeping ?!!

  15. fonfano
    Cupcake Mar 23, 2018

  16. fonfano
    Cupcake Sep 15, 2018

    fonfano , Sep 15, 2018 :
    Hi guys I'm back, my Xperia XZ with oreo (Android 8) was working fine but since 8-10 days the emails are delayed 10 minutes and more at the morning when the phone slept all night long. I made all the commands from alan_helper and I hope this will work again !

  17. fonfano
    Cupcake Sep 18, 2018

  18. fonfano
    Cupcake Jan 30, 2019

  19. fonfano
    Cupcake Sep 18, 2019

    fonfano , Sep 18, 2019 :

    It seems I fixed it easily for me !

    With ADB :
    type : adb shell dumpsys deviceidle disable

    You must have a repply :
    Deep idle mode disabled
    Light idle mode disabled

    (your phone only need to be on developper mode and usb debugging, and install adb on computer)

    Before that I read dozens of threads and I unsuccessfully disabled every battery/data optimization on phone settings and all apps too, deep inside !

    Tell me if it helps !

  20. webstas
    Cupcake Oct 7, 2019

    webstas , Oct 7, 2019 :
    Security exception: Package com.adamioan.scriptrunner has not requested permission android.permission.DEVICE_POWER the script runner fix doesn't seem to work on tmobile variant