开发者

Can inactive Broadcast Receivers be reused?

开发者 https://www.devze.com 2023-01-30 06:46 出处:网络
Let\'s say a BroadcastReceiver is declared in the manifest. It has run through onReceive() once and is the only comp开发者_如何学JAVAonent in the hosting process. What if another Intent is broadcast,

Let's say a BroadcastReceiver is declared in the manifest. It has run through onReceive() once and is the only comp开发者_如何学JAVAonent in the hosting process. What if another Intent is broadcast, is a new process spawn every time, or would the old one be reused if it hasn't been killed?

In other words: Is the onReceive()-method only run through ONCE for each receiver object?


would the old one be reused if it hasn't been killed?

No.

Is the onReceive()-method only run through ONCE for each receiver object?

Yes, for manifest-registered receivers.

0

精彩评论

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