开发者

broadcast receivers Issues

开发者 https://www.devze.com 2023-04-09 17:46 出处:网络
In my app I listen for bootup receiver and once I receive it, I do some stuff The problem I see is even when my broadcast receiver is done, app stays in the running processes.

In my app I listen for bootup receiver and once I receive it, I do some stuff The problem I see is even when my broadcast receiver is done, app stays in the running processes. This happens every time when the phone is started and I have customer complaining why my app stays in background even when they have not started it. Wh开发者_如何学JAVAat is the best way to make sure my app does not keep running in background once I am done with rec


Do whatever needs to be done after bootup in a service and call stopSelf() once it is done. But even when your app is listed in the running processes tab doesn't mean that its hurting anyone. The resources used by it will be made available by the managed runtime when needed either way.

0

精彩评论

暂无评论...
验证码 换一张
取 消