NightscoutFoundation / xDrip

Nightscout version of xDrip+
https://jamorham.github.io/#xdrip-plus
GNU General Public License v3.0
1.39k stars 1.14k forks source link

"Motion Tracking" feature in S21 phone not working #1813

Closed reijoahola-nightscout closed 1 month ago

reijoahola-nightscout commented 3 years ago

I used xDrip+ Motion Tracking feature successfully with my older phone Samsung Galaxy S9 / Android 9 (SM-G960F). Then I upgraded into Samsung Galaxy S21 5G / Android 11 (SM-G991B/DS). Unfortunately Motion Tracking seems not to work. It was automatically disabled with a note "... may be incompatible with your phone". Has somebody successfully used Motion Tracking with S21. Is there possibly something what I should do to correct the situation ?

xDrip+ version: the latest Nightly Builds, now 2021.08.04 but probably the same problem in earlier releases.

xDrip+ configuration: Data source 640G/Eversense (patched G6 app = BYODA). Android Wear Integration = ON (Wear OS watch)

tolot27 commented 3 years ago

Did you ask in the support groups (FB, Gitter) as it was described in the issue template?

reijoahola-nightscout commented 3 years ago

Did you ask in the support groups (FB, Gitter) as it was described in the issue template?

Yes, I opened a question at first in xDrip Fb group. I was recommended to open an issue about this.

tolot27 commented 3 years ago

Did anyone experience the same problem? Are there any further log entries? I assume there are some further permissions needed.

Please can you enable extra logging (ActivityRecognizer:v)?

tolot27 commented 3 years ago

Android 10 changed the Activity API and also the permission. It is sometimes auto-granted. Please can you check in your system permission settings, whether Activity Recognition is granted to xDrip?

reijoahola-nightscout commented 3 years ago

Android 10 changed the Activity API and also the permission. It is sometimes auto-granted. Please can you check in your system permission settings, whether Activity Recognition is granted to xDrip?

Yes, App Permissions for xDrip+ has "Physical Activity" ON if it is the same as "Activity Recognition". It was also ON in the old phone.

But then I noticed that "Change system setting" was not "Allow permissions" in the new phone and allowed in the old phone. I am now testing with that if it helps.

reijoahola-nightscout commented 3 years ago

Did anyone experience the same problem? Are there any further log entries? I assume there are some further permissions needed.

Please can you enable extra logging (ActivityRecognizer:v)?

How is extra logging (ActivityRecognizer:v) enabled ?

tolot27 commented 3 years ago

How is extra logging (ActivityRecognizer:v) enabled ?

Settings->Less common settings-> Extra logging -> Extra tags for loggings

reijoahola-nightscout commented 3 years ago

I sended Error and Event List directly from xDrip+. Still using Nightly Build 2021.08.04.

reijoahola-nightscout commented 3 years ago

Extra Logging gave this additional info: "Received ActivityRecognition we were not expecting!" and after that xDrip+ disabled Motion Tracking again.

Navid200 commented 1 month ago

My understanding is that motion tracking may not work on all phones. It also is not directly related to blood glucose. So, I am going to close this. We can reopen if needed.

tolot27 commented 1 month ago

Extra Logging gave this additional info: "Received ActivityRecognition we were not expecting!" and after that xDrip+ disabled Motion Tracking again.

This message is reported if motion tracking is already disabled: https://github.com/NightscoutFoundation/xDrip/blob/f96d4e5ba282bf385dfc2ea8b070b39cb8b4303e/app/src/main/java/com/eveningoutpost/dexdrip/services/ActivityRecognizedService.java#L530