Repository navigation
fix: 没有登录态时也先把后台服务切到前台 - #1
Closed
little-starts wants to merge 1 commit into
Closed
little-starts wants to merge 1 commit into
little-starts wants to merge 1 commit into
Conversation
开机广播会用 startForegroundService 拉起实时服务。没有 token 时直接 stopSelf,慢设备上会触发前台服务超时,整个进程被杀掉。 Co-authored-by: wit_cat <little-starts@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
开机广播会用
startForegroundService拉起后台实时服务。没有登录态时原先直接stopSelf(),没有调用startForeground()。在比较慢的设备上,系统会判定前台服务超时并杀掉整个进程,聊天界面一起消失。现在无论有没有 token,都会先进入前台,没有登录态时再立刻撤掉通知并停止服务。
云端模拟器这边另外把分辨率降到 480×854、去掉 Google 服务,改用更轻的系统镜像。嵌套虚拟化无法创建虚拟 CPU,模拟器只能软件模拟,系统仍然会无响应,WebView 渲染进程也会崩溃,所以这次还不能在云端正常点开客户端。