开发者

A main activity call a intent and the original receiver was killed

开发者 https://www.devze.com 2023-03-05 09:02 出处:网络
A main activity call a in开发者_如何学Gotent to do something(like install a certain apk)and main activity have a receiver to monitor the intent ACTION; but the problem is, for some case, main activity

A main activity call a in开发者_如何学Gotent to do something(like install a certain apk)and main activity have a receiver to monitor the intent ACTION; but the problem is, for some case, main activity will be killed if the memory is not enough, the intent receiver too. How do I keep the receiver live ?


You should move your receiver out of activity, and declair it in your AndroidManifest.xml.

0

精彩评论

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