I'm working on the app which makes actions based on user activity. It uses Google Activity Recognition (AR) for that purpose. But AR updates stop when app goes to background probably. It happens not immediately and not always. There are no updates when user definitely moves (by foot or car).
The app requests AR updates from foreground service. App process is alive, foreground service writes periodical log.
I tried IntentService and BroadcastReceiver as listener. And both: ActivityRecognitionClient.requestActivityUpdates() and ActivityRecognitionClient.requestActivityTransitionUpdates()
The app uses: minSdkVersion 21 targetSdkVersion 30 compileSdkVersion 31
I've looked at some interesting discussions like Activity Recognition in background and Detect phone movement when screen is off, and Android accelerometer not working when screen is turned off but they are quite old.
Does anybody face similar problem today?
Do we have firmware-accelerometer related questions still (from the discussions above)?
Could anybody comment please?