Are Android's BroadcastReceivers started in a new thread?

前端 未结 5 1313
难免孤独
难免孤独 2020-12-05 00:01

If I have an inner class that extends BroadcastReceiver within my Service class, should I care about synchronization, when the BroadcastRecei

5条回答
  •  庸人自扰
    2020-12-05 00:31

    Also, you can specify the "android:process" receiver element attribute in the AndroidManifest.xml. See here. That way you can specify that the receiver runs as a separate process and isn't tied to the main UI thread.

提交回复
热议问题