Originariamente inviato da
andQlimax
Ciao a tutti,
Ho creato un app che potrebbe interessare a tutti quelli che spesso hanno problemi di ritardo nelle notifiche push.
In poche parole succede che con alcuni router o alcuni operatori mobile, la connessione per le push notifications viene interrotta dopo un periodo di tempo di inattività.
A quel punto quindi succede che non ricevete più notifiche finchè non viene ristabilita quella connessione. Per ristabilire la connessione android ha una sorta di meccanismo di keep alive che si attiva ogni 15 minuti in wifi oppure ogni 28 minuti in 3g, che sono tempi un pò alti. Quindi se il router ti termina la connessione dopo 5 minuti, inizierai di nuovo a ricevere notifiche dopo 10 minuti ad esempio.
Questa app quindi cambia questi valori ad un intervallo più basso che potete decidere voi.
***Come si usa? Installa l'app, concedi i permessi di root, premi "apply heartbeat interval now" per cominciare a non avere più ritardi nelle notifiche push!
Vi lascio alla descrizione che ho messo sul play store, in inglese, poi magari col tempo la traduco anche in italiano!
This app will fix the delayed push notifications, that some users may notice, for EVERY app.
* The problem:
To properly work, the push notifications need a long running connection ( a tcp connection on the port 5228 ) between your phone and the google servers. What happen is that for some users the wifi router or the mobile carrier can close this connection after some time of inactivity (
tcp idle timeout ). Thats the reason why you will have no push notifications untill this connection get re-enstabilished by android. GTalk have a keep-alive mechanism thats send an heartbeat network packet to mantain the push notifications connection open, the problem is that this heartbeat interval is to high for some users, in fact by default it occurs every 15 minutes on wifi or every 28 minutes on 3G!
* The solution:
This app shorten the gtalk keep-alive interval (also called
Heartbeat Interval) to an user configurable value in order to avoid delayed push notifications for EVERY app that use push. In order to update the gtalk heartbeat interval, this app requires ROOT and must run at phone boot.
The recommended value is 5 minutes, its should be enough short for everyone.
This app does NOT drain battery in background, its only run once at boot time to set the gtalk heartbeat interval and stops the google service framework so that the new value can be used.
* Gtalk Monitor
To check what I'm talking about open the dialer, and dial this code *#*#TALK#*#*, scroll down and search for the Heartbeat Interval.
* Notice:
This app is tested on a Galaxy Nexus, if you notice problem on your device, don't rate bad, just email me and I will try my best to make it work for you. Anyway I'm NOT responsible to anything bad this app can do to your device (nothing bad should happen, but you know, I need to warn you)
* Restore the default heartbeat value
If you have problems or you dont need this app, uninstall it and reboot your device. Thats all.
In the extremely rare case something is wrong, go into Settings->Application->All and clear data for the app Google Services Framework (or remove and add again your google account).
PLAY STORE LINK [FREE]
Changelog:
Version 2.1, 2013/02/14 :
- Added back 1 minute in the preferred heartbeat interval list and added some preset descriptions
- Reduced a little bit the amount of single SU commands executed
Thanks for the feedbacks!
Version 2.0, 2013/02/06 :
- Completely interface redesign
- Removed ads banners, please consider a donation to support the development of this app
- Improved SU commands thanks to SuperSU guidelines
Version 1.3, 2013/01/31 :
- New: If needed the heartbeat its set every time the phone connects to wifi or 3g
Version 1.2, 2013/01/24 :
- Improve: detection of errors while updating the hearbeat
- Fix: crash on some devices starting Gtalk Monitor
Version 1.1, 2013/01/24 :
- Fix: admob banner
Version 1.0, 2013/01/23 :
- First release