Android - start alarm service immediately?

前端 未结 2 1458
深忆病人
深忆病人 2021-01-26 07:31

I have created an On Boot Receiver to repeatedly call a wakeful intent service every 5 minutes but cannot figure out how to start the service immediately when the app is install

2条回答
  •  逝去的感伤
    2021-01-26 07:49

    If you want to set an alarmmanager to start your service when the app is installed, then it's not possible. It's a OS limitation, security if you will. But if you want to start the service in the moment the app starts, just call it, it will keep runing.

提交回复
热议问题