Step Counter in Android: always on?

后端 未结 2 746
一个人的身影
一个人的身影 2021-01-17 12:02

It is a well known issue that many Android phones switch off the accelerometer when the screen goes off. However something seems to have changed with Android Fit (the app).

2条回答
  •  一个人的身影
    2021-01-17 12:04

    Every normal Thread is keep on working when the screen goes off or when the Activity lost its focus...but when the activity gets killed then all thread are killed...

    However you can use services for longrunning tasks like asking the accelerometer for example

提交回复
热议问题