• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

Google Talk disconnecting repeatedly, also affecting push notifications

Search This thread

stecas

Member
Jan 8, 2010
8
1
The app is pubblished guys.

Should be available soon here: https://play.google.com/store/apps/details?id=com.andqlimax.pushfixer

I created a support thread on the gnex themes and apps section: http://forum.xda-developers.com/showthread.php?p=37096146

Remember is the first version, it may look not cool but it works! ;)

EDIT: its available now, Someone tried the in-app Donate ? I'm not sure if really work, thats one thing which i couldn't test my self, it seems I can't donate to myself obviously lol

I've installed the app.
When I reboot the phone, even though I selected the ON button, the value is 28 min.
This is because probably the start of the gtalk overwrites the update made ​​by your app.

For me, when the phone starts, your application should kill gtalk process, launch the update then start the process gtalk.

Italiano

Ho installato l'app.
Quando riavvio il telefono, anche se ho selezionato il bottone ON, il valore resta 28 min.
Questo perchè probabilmente l'avvio del processo di gtalk sovrascrive l'update fatta dalla tua app.

Per me, quando il telefono si avvia, la tua applicazione dovrebbe killare gtalk process, lanciare l'update quindi avviare il processo gtalk.
 
Last edited:

andQlimax

Senior Member
Jul 29, 2010
2,559
1,003
Rome
I've installed the app.
When I reboot the phone, even though I selected the ON button, the value is 28 min.
This is because probably the start of the gtalk overwrites the update made ​​by your app.

For me, when the phone starts, your application should kill gtalk process, launch the update then start the process gtalk.

Italiano

Ho installato l'app.
Quando riavvio il telefono, anche se ho selezionato il bottone ON, il valore resta 28 min.
Questo perchè probabilmente l'avvio del processo di gtalk sovrascrive l'update fatta dalla tua app.

Per me, quando il telefono si avvia, la tua applicazione dovrebbe killare gtalk process, lanciare l'update quindi avviare il processo gtalk.

hi already response here http://forum.xda-developers.com/showthread.php?p=37117881#post37117881

my app already kills gtalk

im not sure what is the problem, later tonight ill do some tests
 

pedromarga

Member
Nov 28, 2012
14
0
I am facing a new problem. With no intervention, after a lot of time sleeping (like during the night), the heartbeat value is returning to 15 minutes and I can't figure why.

Do you know where the hell this 15 minutes come from when we restart the phone? it comes from the network or some ROM file?
 
Last edited:

andQlimax

Senior Member
Jul 29, 2010
2,559
1,003
Rome
I am facing a new problem. With no intervention, after a lot of time sleeping (like during the night), the heartbeat value is returning to 15 minutes and I can't figure why.

Do you where the hell this 15 minutes come from when we restart the phone? it comes from the network or some ROM file?

Its the google services framework app that set that values with its logic, basing on events and network types
 

andQlimax

Senior Member
Jul 29, 2010
2,559
1,003
Rome
I see.

What do you think about adding an optional "timer" service on your app, performing the operation every X minutes (only if the screen if off, to avoid stopping GSF when using it)?

ya, im also thinking to something like that

the app could check every x minutes (configurable) if the heartbeat interval is the one you set and only if the value is different then update it with the correct value and stop gsf as usual, stopping it while you using ur phone is not a problem (its restart in few seconds and you dont loose anything)

otherwise an other solution, maybe better, its to check if the heartbeat has changed when the phone just connect to a network (wifi or 3g), while the phone is connected to a network the heartbeat shouldn't be changed
 
  • Like
Reactions: bixirulo

pedromarga

Member
Nov 28, 2012
14
0
ya, im also thinking to something like that

the app could check every x minutes (configurable) if the heartbeat interval is the one you set and only if the value is different then update it with the correct value and stop gsf as usual, stopping it while you using ur phone is not a problem (its restart in few seconds and you dont loose anything)

otherwise an other solution, maybe better, its to check if the heartbeat has changed when the phone just connect to a network (wifi or 3g), while the phone is connected to a network the heartbeat shouldn't be changed
It would be great!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    R: Google Talk disconnecting repeatedly, also affecting push notifications

    is there a way to decreade this 15 minutes time?? to 5 for example??

    I just found a way:

    - install https://play.google.com/store/apps/details?id=oliver.ehrenmueller.dbadmin (need root)
    - from the app open the file in /data/data/com.google.android.gsf/databases/gservices.db
    - run this SQL query: update main set value=300000 where name like 'gtalk_%heartbeat_ping_interval_ms';
    - commit the change

    It basically set the heartbeat to 300000 ms, 5 minutes..to take effects u have to stop Google services framework in settings-> applications->all, be sure to stop it..after that sevice start again(disable and re enable wifi or 3g ) the gtalk heartbeat should be 5 minutes, and u shouldn't notice delay in push notifications ( from the dialer compose *#*#8255#*#* and see if the gtalk heartbeat interval is 5 minutes instead of 15)

    Anyway that change is not persistent, when you reboot the device u need to reapply it if u want or create an init.d script that run it at boot..I'm thinking to write an app in the next days if that works

    I tried it and seems to work atm, I'm not responsible for any damages u can cause anyway

    EDIT: Here an app that does all those steps automatically https://play.google.com/store/apps/details?id=com.andqlimax.pushfixer (need root)

    Inviato dal mio Galaxy Nexus con Tapatalk 2
    3
    Thanks guys, I'm happy too that it works :)
    It was a problem that was getting me crazy too for about 3 years I think, then suddently answering to this thread I got the solution!

    I'm writing a little app to set your preferred heartbeat interval at boot time! It seems to work already, just doing some test, I will probably publish it later or tomorrow

    Ps: the app will be free, probably will add a little in-app purchase if someone want donate or something :)
    2
    R: Google Talk disconnecting repeatedly, also affecting push notifications

    Mate.... thanks a lot!!!!.... it seens to be working here...!! .... the notifications are been received much faster now...

    I dont know how to do a init.d script..... it would be really nice,,,

    for now it fix my prblems....! thanks again!

    EDIT: After some tests I`m sure u solved the issue..... just to know... the default value here is 28 minutes....... my carrier sucks....

    maybe it increase the battery comsumption??

    In 3g is 28 minutes and in WiFi is 15 minutes, that's the default on android.. The problem is that as I said some routers, or in ur case ur carrier apply some policy to kill unused connection

    I'm happy that it works, it should not have a big impact on the battery I think

    Inviato dal mio Galaxy Nexus con Tapatalk 2
    2

    Just pushed new version that does that, if needed it set the heartbeat every time ur phone connect to wifi or 3g

    please refer to this thread for much info http://forum.xda-developers.com/showthread.php?t=2142503
    1
    it depends from the routers (if u have problem under wifi) or by ur carrier (if u have problem with mobile data), or both if u are unlucky

    in my case it happens only when connected to the wifi, under 3g push notifications are always instalntly

    basically the push notifications needs a long stable connection ( tcp connection on the port 5228) between ur phone and the google servers, what happen is that ur wifi router (or ur mobile carrier ) can close this connection if there is no activities for some time

    basically some crap routers have a tcp idle timeout set to a low value, example 300 seconds...so if in those 5 minutes u dont send/receive any push notification, the router kill/close the tcp connection because it thinks it is an unused connection, the problem is that ur phone will not going to check if this connection is open, because its how push notifications must works

    so u will have no push notifications untill this connection get re-enstabilished, that happen every 15 minutes by default on android (note that the same problem is for the apple push notifications)

    a possible solution is to change the router with a better one, or in case u have problems with mobile data try to call ur operator and tell they to change their tcp idle timeout (probably is not going to happen :D ) or change carrier