Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

固定心跳能不能分wifi和流量来设置 #93

Open
AragakiSaro opened this issue Nov 16, 2022 · 3 comments
Open

固定心跳能不能分wifi和流量来设置 #93

AragakiSaro opened this issue Nov 16, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@AragakiSaro
Copy link

wifi下fcm本身支持自适应心跳周期,如果收不到消息它会自动调整心跳,比如图中303_5G是230s,NCUWLAN是1070s,我这里可以正常使用

但是切换到mobile data,心跳被fcm固定到1680秒,我就经常收不到消息必须用fcm fix来调整心跳周期,但这会导致wifi下的心跳周期也会变,所以我必须吧心跳调整到wifi配置下的最小周期,即230s才能保证在所有网络下正常使用。。导致耗电增加

能指导下如果要想修改mobile data下的1680s 周期,我应该应该修改哪个文件吗
e2d24247b2c746f4aef56895b3e7592

@kooritea
Copy link
Owner

现有的设置区分不了wifi或者数据。

如果你想说功能代码在哪里的话那就在/app/src/main/java/com/kooritea/fcmfix/xposed/ReconnectManagerFix.java149行开始的方法上,但是得找一下怎么判断wifi还是数据

@AragakiSaro
Copy link
Author

原谅我没看懂怎么改的。。

https://stackoverflow.com/questions/19560448/how-to-avoid-delay-in-android-gcm-messages-change-heartbeat
我在这找到了心跳周期的数据库
sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "SELECT * FROM main WHERE name ='gtalk_max_server_heartbeat_time';"
sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "SELECT * FROM main WHERE name LIKE 'gtalk_%heartbeat_ping_interval_ms';"

但是我修改了没有效果,过一会自动恢复

@kooritea kooritea added the enhancement New feature or request label Nov 16, 2022
@kooritea
Copy link
Owner

有空我看看吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants