Do android broadcast receivers consume battery life?

后端 未结 1 542
醉酒成梦
醉酒成梦 2021-01-12 17:28

I have two receivers that are listening for android.intent.action.BOOT_COMPLETED and android.intent.action.PACKAGE_REPLACED. I was wondering how mu

相关标签:
1条回答
  • 2021-01-12 17:39

    The broadcast receivers themselves will not directly consume much battery life. BOOT_COMPLETED happens once; PACKAGE_REPLACED happens only on an application upgrade. Those probably average one event per day.

    Now, if those broadcast receivers do other stuff, such as starting services, that may have significant battery implications...but that is a problem with your services, not with the receivers themselves.

    0 讨论(0)
提交回复
热议问题