开发者

Is there any benefit to put a broadcastreceiver in a separate process?

I 开发者_如何学Gosaw a piece of code, where the broadcastreceiver is declared in a separate process (android:process=":XXXXXX" in AndroidManifest.xml)

And the corresponding onReceive() code looks like this:

startService(new Intent(context, XXXService.class);
Process.killProcess(Process.myPid());

Is there any benefit to do this?


Is there any benefit to do this?

None that I can think of. That code in question should not even work, as AFAIK startService() will not have begun by the time the process is killed.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜