Update data in Background Periodically (Android)

后端 未结 1 720
余生分开走
余生分开走 2021-01-21 17:51

The main objective of my app is, when a button is pressed:

  1. Collect data from the sensors
  2. Store data in the database
  3. Repeat periodically (every X
1条回答
  •  -上瘾入骨i
    2021-01-21 18:20

    Try to start service in separate process using android:process=":servicename" in AndroidManifest.xml. If service is running in another process, it wouldn't be killed with activity.

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