Skip to content

fix: 没有登录态时也先把后台服务切到前台 - #1

Closed
little-starts wants to merge 1 commit into
mainfrom
cursor/lighter-android-emulator-d842
Closed

little-starts wants to merge 1 commit into
mainfrom
cursor/lighter-android-emulator-d842

Conversation

@little-starts

Copy link
Copy Markdown
Collaborator

开机广播会用 startForegroundService 拉起后台实时服务。没有登录态时原先直接 stopSelf(),没有调用 startForeground()。在比较慢的设备上,系统会判定前台服务超时并杀掉整个进程,聊天界面一起消失。

现在无论有没有 token,都会先进入前台,没有登录态时再立刻撤掉通知并停止服务。

云端模拟器这边另外把分辨率降到 480×854、去掉 Google 服务,改用更轻的系统镜像。嵌套虚拟化无法创建虚拟 CPU,模拟器只能软件模拟,系统仍然会无响应,WebView 渲染进程也会崩溃,所以这次还不能在云端正常点开客户端。

Open in Web Open in Cursor 

开机广播会用 startForegroundService 拉起实时服务。没有 token 时直接 stopSelf,慢设备上会触发前台服务超时,整个进程被杀掉。

Co-authored-by: wit_cat <little-starts@users.noreply.github.com>
@kukemc kukemc closed this Oct 19, 2026
@kukemc
kukemc deleted the cursor/lighter-android-emulator-d842 branch October 19, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants