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.
精彩评论