[APP][4.1+][FREE][10-SEP-2016] Push Notifications Fixer No-Root v2.5

Search This thread

andQlimax

Senior Member
Jul 29, 2010
2,560
1,003
Rome
FEATURED by Whatsapp Support Page

Hi everyone,

Are you experiencing delayed push notifications from GTalk/Hangouts, GMail, Whatsapp (partial fix), Facebook, Play Store web install, etc? If so, then this app its for you!!
It's FREE! No banners. No ads. Please consider donating to the developer (link in the app).

This app work for EVERY phone. ROOT is NOT required
Root version here: http://forum.xda-developers.com/showthread.php?t=2142503

This app basically keep alive the push connection on your phone. It avoid the tcp connection timeout that can occurs on some wifi routers or on some mobile carriers.
You will always receive instantly push notifications.

● Why were my notifications delayed in the first place?
Apps using Google's push service (Hangouts, Gmail, Facebook Messenger, e.g.) connect your phone to Google’s servers via one TCP connection (on port 5228).
To keep this connection alive, Android uses a periodic heartbeat to prevent the connection from timing out. By default, this heartbeat occurs every 15 minutes on wifi and every 28 minutes on a mobile data connection.
This is problematic because most Wi-Fi routers and mobile carriers will automatically terminate this connection after a short time of inactivity.
Because your phone is not aware that this connection was externally closed, you will not receive push notifications until this connection is reestablished when the next heartbeat is sent.

● How does PNF solve this problem?
Every x minutes it invoke an android activity that will send an heartbeat network packet on the push connection. Sending an heartbeat every 5 minutes should be enough to always keep the connection alive and all your push notifications will be instantly.
The battery should not be much impacted over a day.

Download here: PLAY STORE LINK (or get the attached APK in case not available on your country for some reason)

Please, if the are problems don't rate bad, send me an email ( [email protected] ) or post the problem in this thread and I'll answer you as soon as possible.
Feedback are welcome!



Changelog:
See post Number 2

FAQ:
See post Number 3

Report to google here: https://productforums.google.com/fo...onnecting-to-networks-and-devices/fslYqYrULto

Download it from play store to receive future app updates ;)
 

Attachments

  • PushFixerNoRoot-v2.0.apk
    1 MB · Views: 2,162
  • PushFixerNoRoot-v2.5.apk
    1.4 MB · Views: 3,214
Last edited:

andQlimax

Senior Member
Jul 29, 2010
2,560
1,003
Rome
Changelog:

Version 2.5, 2016/09/10:
- Small update. Soon new things!

Version 2.0, 2015/06/30:
- Fix PNF auto-startup after phone reboot

Version 1.5, 2015/01/04:
- Material design for android lollipop

Version 1.1, 2014/03/06:
- Fix app not autostart at network changes on some phone
- The app start at phone boot itself, no need to start it or do anything

Version 1.0, 2013/11/05 :
- First release
 
Last edited:

andQlimax

Senior Member
Jul 29, 2010
2,560
1,003
Rome
FAQ

Q: Does this app drain battery in background? Does lowering the heartbeat interval too much cause more battery drain?
A: It should have not a big impact on the battery during your daily use. I recommend hearbeat set to 5 minutes, it should be enough to make you receive instantly notifications.

Q: What does mean "set the heartbeat to x minutes" ?
A: It means only that android will send a network packet over the push connection every x minutes instead of the default 15/28 minutes to keep alive that connection. It does NOT mean that you receive push notification every x minutes. Notifications are instantly if the push connection is alive.

Q: Why Whatsapp messages are still delayed sometimes?
A: Whatsapp, and some others apps, don't completely rely on google push service (GCM). Those apps start their own connection when you open the application, and the messages come through this connection. The heartbeat is sent by android only on the push connection on the port 5228, and so it only keep-alive that particular connection. Blame those apps that doesn't have a keep-alive mechanism for their connection or that doesn't use full push messaging.
A workaround for whatsapp is to swipe it away from the recent apps when your finished a chat session. In this way it's connection is dropped and you will be notified of new messages through google push notifications.
 
Last edited:

Hitsbam

New member
Sep 7, 2012
2
0
How?

Hi, Im using your application, the root one.

But I'm interested in how this one works.

I recently developed an app that use GCM to send messages between devices.

If you can answer me... How do you send the heartbeat through an Activity? This can help a lot of people since Google don't do anything.

Thank you :D
 

andQlimax

Senior Member
Jul 29, 2010
2,560
1,003
Rome
Hi, Im using your application, the root one.

But I'm interested in how this one works.

I recently developed an app that use GCM to send messages between devices.

If you can answer me... How do you send the heartbeat through an Activity? This can help a lot of people since Google don't do anything.

Thank you :D

Basically to trigger an heartbeat you only need those 2 lines (those are undocumented, I it discovered by decompiling GSF):
Code:
context.sendBroadcast(new Intent("com.google.android.intent.action.GTALK_HEARTBEAT")); 
context.sendBroadcast(new Intent("com.google.android.intent.action.MCS_HEARTBEAT"));

where context is the application context.

Those intents will be "catched" by GoogleServicesFramework (GSF) that will physically send the heartbeat packet to the google servers. If an aswer come back instantly the push connection is alive, otherwise if in 60 seconds there is no answer back, GSF will initiate a new push connection without to wait the next heartbeat.
The first intent is for Ice Cream Sandwhich and below "I think", while the second one is used in new android versions, should depend from the GSF version installed..But you can safety fire both, since one of the two won't just do anything.

Not sure if it is a good practice to place it inside an application, since if every developer will do that the battery will be killed. Maybe you can invoke that only in some situations.
 
Last edited:

Hitsbam

New member
Sep 7, 2012
2
0
Basically to trigger an heartbeat you only need those 2 lines:
Code:
context.sendBroadcast(new Intent("com.google.android.intent.action.GTALK_HEARTBEAT")); 
context.sendBroadcast(new Intent("com.google.android.intent.action.MCS_HEARTBEAT"));

where context is the application context.

Those intents will be "catched" by GoogleServicesFramework (GSF) that will physically send the heartbeat packet to the google servers. If an aswer come back instantly the push connection is alive, otherwise if in 60 seconds there is no answer back, GSF will initiate a new push connection.
The first intent is for Ice Cream Sandwhich and below "I think", while the second one is used in new android versions, should depend from the GSF version installed..But you can safety fire both, since one of the two won't just do anything.

Not sure if it is a good practice to place it inside an application, since if every developer will do that the battery will be killed. Maybe you can invoke that only in some situations.

Thanks a lot.

Your right, if every developer use it then can turn in to a problem.

I'm not going to use it, only in the start of the app if the users reports me problems. But first i'm going to suggest your application, i think is a better solution by the moment :good:.

Thanks for satisfy my curiosity.
 

lefty68

Member
Nov 13, 2013
6
1
Great app :good:

I'm new with android. How can I swipe whatsapp away from the recent apps in settings when I finished a chat session?

Thanks in advance ;)
 

andQlimax

Senior Member
Jul 29, 2010
2,560
1,003
Rome
Great app :good:

I'm new with android. How can I swipe whatsapp away from the recent apps in settings when I finished a chat session?

Thanks in advance ;)

Depends from your phone I think, just launch the recent apps list and remove / swype whatsapp from there..
On the Nexus phones there is a dedicated on screen button to open the recent app list, on some Samsung phone I think you can long press the home button.

Inviato dal mio Galaxy Nexus utilizzando Tapatalk
 
  • Like
Reactions: albertronic

lefty68

Member
Nov 13, 2013
6
1
Depends from your phone I think, just launch the recent apps list and remove / swype whatsapp from there..
On the Nexus phones there is a dedicated on screen button to open the recent app list, on some Samsung phone I think you can long press the home button.

Inviato dal mio Galaxy Nexus utilizzando Tapatalk


On Huawei g300 phone I can long press the home button to open the recent app list too, but it seems like in android 2.3.6 I can't swipe apps away. Any alternative action?
 

dd00_xda

New member
Nov 15, 2013
1
0
Basically to trigger an heartbeat you only need those 2 lines (those are undocumented, I it discovered by decompiling GSF):
Code:
context.sendBroadcast(new Intent("com.google.android.intent.action.GTALK_HEARTBEAT")); 
context.sendBroadcast(new Intent("com.google.android.intent.action.MCS_HEARTBEAT"));

Hi, I'am using the same method in my product.
Can we reach an agreement how to reduce the frequency of these intent calls? :)
I have no idea to realize any heartbeat timeout settings in my app (hard policy).

I can't listen for these intents cause it requires com.google.android.c2dm.permission.SEND permission that can't be acquired.

For example, can you send some additional broadcast intent (w/o permissions) when fire heartbeat?
I'll listen for it and reset own alarms to not to do the same action.
 

andQlimax

Senior Member
Jul 29, 2010
2,560
1,003
Rome
Hi, I'am using the same method in my product.
Can we reach an agreement how to reduce the frequency of these intent calls? :)
I have no idea to realize any heartbeat timeout settings in my app (hard policy).

I can't listen for these intents cause it requires com.google.android.c2dm.permission.SEND permission that can't be acquired.

For example, can you send some additional broadcast intent (w/o permissions) when fire heartbeat?
I'll listen for it and reset own alarms to not to do the same action.

I have to check, there is an other intent directly fired by android which indicate that an heartbeat has been sent, you can listen that intent I think
I don't remember it right now what, I will check tomorrow maybe and will let you know
 
  • Like
Reactions: albertronic

andQlimax

Senior Member
Jul 29, 2010
2,560
1,003
Rome
Hi, I'am using the same method in my product.
Can we reach an agreement how to reduce the frequency of these intent calls? :)
I have no idea to realize any heartbeat timeout settings in my app (hard policy).

I can't listen for these intents cause it requires com.google.android.c2dm.permission.SEND permission that can't be acquired.

For example, can you send some additional broadcast intent (w/o permissions) when fire heartbeat?
I'll listen for it and reset own alarms to not to do the same action.
@dd00_xda
It seems there isn't an android system intent that you can listen to check if an heartbeat has been sent.

About your request to send some broadcast intent in my app, what will be the advantage for you? I mean, if you already need my app installed, then you don't need at all your own alarm..My app by default send and heartbeat every 5 minutes for example (the alarm will start every time a connection is made) and in that way the push connection is already alive..and every notification you app need to listen, it will always being received
 
Last edited:
Aug 5, 2010
45
5
Thanks very much for creating this app! I have a question about it.

I previously had a Samsung Galaxy S3 running Android 4.1.2. Push notifications worked fine over Wi-Fi when I was at home.

I have now switched to a Nexus 5 running Android 4.4. I'm still using the same router at home, but I'm getting an issue with notifications being delayed. Sometimes I will not get any notifications for a while, then a bunch will turn up at once from different apps.

Does the issue I've described sound like it's related to the problem that this app is designed to fix? If so, how come everything worked fine with my S3 with the same router?

Many thanks!
 

andQlimax

Senior Member
Jul 29, 2010
2,560
1,003
Rome
Thanks very much for creating this app! I have a question about it.

I previously had a Samsung Galaxy S3 running Android 4.1.2. Push notifications worked fine over Wi-Fi when I was at home.

I have now switched to a Nexus 5 running Android 4.4. I'm still using the same router at home, but I'm getting an issue with notifications being delayed. Sometimes I will not get any notifications for a while, then a bunch will turn up at once from different apps.

Does the issue I've described sound like it's related to the problem that this app is designed to fix? If so, how come everything worked fine with my S3 with the same router?

Many thanks!

maybe the issue is that the device loose the network while the screen is off? that's a common problem on some device, it is not fixed by PNF
 
Aug 5, 2010
45
5
maybe the issue is that the device loose the network while the screen is off? that's a common problem on some device, it is not fixed by PNF
Thanks for the reply!

Do you have any recommendations of how I could troubleshoot this issue? I really don't know what the cause is - I just know it happens, and if it was a widespread issue with the Nexus 5 then a lot more people would be talking about this issue. I've only seen a handful of folks mentioning it.

Thanks again.
 

andQlimax

Senior Member
Jul 29, 2010
2,560
1,003
Rome
Thanks for the reply!

Do you have any recommendations of how I could troubleshoot this issue? I really don't know what the cause is - I just know it happens, and if it was a widespread issue with the Nexus 5 then a lot more people would be talking about this issue. I've only seen a handful of folks mentioning it.

Thanks again.

if the phone disconnect from the wifi while the screen is off (happen also with only some routers sometimes), you usually should see the phone reconnect as soon as you wake the screen..if you pull down the notification bar and open the toggle switch, you should see the wifi icon orange (no connection to google server) and in few seconds become white again (connected).
 
Aug 5, 2010
45
5
if the phone disconnect from the wifi while the screen is off (happen also with only some routers sometimes), you usually should see the phone reconnect as soon as you wake the screen..if you pull down the notification bar and open the toggle switch, you should see the wifi icon orange (no connection to google server) and in few seconds become white again (connected).
Thanks again.

I don't believe the Wi-Fi is disconnecting. I can ping the device when the screen has been off for ages and notifications do come in when the screen is off - they're just delayed and sometimes I don't get a notification at all, yet I'll get an email notification on my PC.
 

andQlimax

Senior Member
Jul 29, 2010
2,560
1,003
Rome
Thanks again.

I don't believe the Wi-Fi is disconnecting. I can ping the device when the screen has been off for ages and notifications do come in when the screen is off - they're just delayed and sometimes I don't get a notification at all, yet I'll get an email notification on my PC.

that's strange...anyway my nexus 5 is arriving, I will do some tests and see if PNF is working correctly on KitKat :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    FEATURED by Whatsapp Support Page

    Hi everyone,

    Are you experiencing delayed push notifications from GTalk/Hangouts, GMail, Whatsapp (partial fix), Facebook, Play Store web install, etc? If so, then this app its for you!!
    It's FREE! No banners. No ads. Please consider donating to the developer (link in the app).

    This app work for EVERY phone. ROOT is NOT required
    Root version here: http://forum.xda-developers.com/showthread.php?t=2142503

    This app basically keep alive the push connection on your phone. It avoid the tcp connection timeout that can occurs on some wifi routers or on some mobile carriers.
    You will always receive instantly push notifications.

    ● Why were my notifications delayed in the first place?
    Apps using Google's push service (Hangouts, Gmail, Facebook Messenger, e.g.) connect your phone to Google’s servers via one TCP connection (on port 5228).
    To keep this connection alive, Android uses a periodic heartbeat to prevent the connection from timing out. By default, this heartbeat occurs every 15 minutes on wifi and every 28 minutes on a mobile data connection.
    This is problematic because most Wi-Fi routers and mobile carriers will automatically terminate this connection after a short time of inactivity.
    Because your phone is not aware that this connection was externally closed, you will not receive push notifications until this connection is reestablished when the next heartbeat is sent.

    ● How does PNF solve this problem?
    Every x minutes it invoke an android activity that will send an heartbeat network packet on the push connection. Sending an heartbeat every 5 minutes should be enough to always keep the connection alive and all your push notifications will be instantly.
    The battery should not be much impacted over a day.

    Download here: PLAY STORE LINK (or get the attached APK in case not available on your country for some reason)

    Please, if the are problems don't rate bad, send me an email ( [email protected] ) or post the problem in this thread and I'll answer you as soon as possible.
    Feedback are welcome!



    Changelog:
    See post Number 2

    FAQ:
    See post Number 3

    Report to google here: https://productforums.google.com/fo...onnecting-to-networks-and-devices/fslYqYrULto

    Download it from play store to receive future app updates ;)
    5
    FAQ

    Q: Does this app drain battery in background? Does lowering the heartbeat interval too much cause more battery drain?
    A: It should have not a big impact on the battery during your daily use. I recommend hearbeat set to 5 minutes, it should be enough to make you receive instantly notifications.

    Q: What does mean "set the heartbeat to x minutes" ?
    A: It means only that android will send a network packet over the push connection every x minutes instead of the default 15/28 minutes to keep alive that connection. It does NOT mean that you receive push notification every x minutes. Notifications are instantly if the push connection is alive.

    Q: Why Whatsapp messages are still delayed sometimes?
    A: Whatsapp, and some others apps, don't completely rely on google push service (GCM). Those apps start their own connection when you open the application, and the messages come through this connection. The heartbeat is sent by android only on the push connection on the port 5228, and so it only keep-alive that particular connection. Blame those apps that doesn't have a keep-alive mechanism for their connection or that doesn't use full push messaging.
    A workaround for whatsapp is to swipe it away from the recent apps when your finished a chat session. In this way it's connection is dropped and you will be notified of new messages through google push notifications.
    4
    Changelog:

    Version 2.5, 2016/09/10:
    - Small update. Soon new things!

    Version 2.0, 2015/06/30:
    - Fix PNF auto-startup after phone reboot

    Version 1.5, 2015/01/04:
    - Material design for android lollipop

    Version 1.1, 2014/03/06:
    - Fix app not autostart at network changes on some phone
    - The app start at phone boot itself, no need to start it or do anything

    Version 1.0, 2013/11/05 :
    - First release
    3
    I start seeing some download, but few stars.. Come on show your gratification with 5 stars :D

    Inviato dal mio Galaxy Nexus utilizzando Tapatalk
    2
    Hi, Im using your application, the root one.

    But I'm interested in how this one works.

    I recently developed an app that use GCM to send messages between devices.

    If you can answer me... How do you send the heartbeat through an Activity? This can help a lot of people since Google don't do anything.

    Thank you :D

    Basically to trigger an heartbeat you only need those 2 lines (those are undocumented, I it discovered by decompiling GSF):
    Code:
    context.sendBroadcast(new Intent("com.google.android.intent.action.GTALK_HEARTBEAT")); 
    context.sendBroadcast(new Intent("com.google.android.intent.action.MCS_HEARTBEAT"));

    where context is the application context.

    Those intents will be "catched" by GoogleServicesFramework (GSF) that will physically send the heartbeat packet to the google servers. If an aswer come back instantly the push connection is alive, otherwise if in 60 seconds there is no answer back, GSF will initiate a new push connection without to wait the next heartbeat.
    The first intent is for Ice Cream Sandwhich and below "I think", while the second one is used in new android versions, should depend from the GSF version installed..But you can safety fire both, since one of the two won't just do anything.

    Not sure if it is a good practice to place it inside an application, since if every developer will do that the battery will be killed. Maybe you can invoke that only in some situations.