Android Broadcast receiver not executed on application close

前端 未结 2 1100
情书的邮戳
情书的邮戳 2021-01-12 16:36

I have an android application, where I schedule to an event (location update) to be executed in the future using Alarm manager. The scheduled event executes as expected as l

2条回答
  •  梦谈多话
    2021-01-12 17:26

    You have to add your app in the Android Settings > Protected Apps section on the phone. This lets the user control which apps to allow running in the background.

    You could also write a service to listen to the location broadcasts which will run in the background without problem if you get the necessary permissions.

提交回复
热议问题