I saw 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?
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.