Background Process to scan the location of the user at regular intervals and update the local database even when the app is not open

前端 未结 6 1355
梦毁少年i
梦毁少年i 2021-01-05 10:32

I am creating an app that checks for user locations every half an hour and updates the location of the user in the local database and then runs CRUD queries based on the use

6条回答
  •  死守一世寂寞
    2021-01-05 11:26

    I think you are looking for something similar to WakefulIntentService. This handles all your cases completely.

    You can do your location and db related work inside doWakefulWork() of said implementation.

提交回复
热议问题