gpt4 book ai didi

java - 当应用程序从堆栈中终止时,后台服务将停止

转载 作者:行者123 更新时间:2023-12-01 19:34:55 25 4
gpt4 key购买 nike

当应用程序从堆栈中终止时,后台服务停止

public int onStartCommand(Intent intent, int flags, int startId) {

googleApiClient = new GoogleApiClient.Builder(getApplicationContext())
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(LocationServices.API)
.build();

return START_STICKY;
}

最佳答案

没有直接的解决方案,但下面的链接中提到了解决方法,

https://stackoverflow.com/a/58162451/7579041

以上链接对于 OnePlus、OPPO、VIVO 等库存 ROM 和自定义 ROM 设备非常有用

希望这对你有帮助

关于java - 当应用程序从堆栈中终止时,后台服务将停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58182283/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com