Make xDrip compatible with latest Full Android Smartwatches #1973
parapenT1sta
started this conversation in
General
Replies: 3 comments 9 replies
-
@parapenT1sta Where you asked to open an issue? |
Beta Was this translation helpful? Give feedback.
1 reply
-
The request to not open an issue, unless directed by a developer, which you could have seen when you opened this, applies to all users. You already have the attention of tolot27. He has authority to open issues when/if needed. |
Beta Was this translation helpful? Give feedback.
8 replies
-
#1988 was merged today. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As per discussed on this topic, xDrip is detecting Full Android Smartwaches as Android Wear (wearOS) Smartwaches and Bluetooth Service stops after smartwatches are wrongly detected.
I have compiled a version with @tolot27 code suggestion and shared on xDrip Facebook group and this is the list of watches tested and confirmed the fix:
The patch applied on
app/src/main/java/com/eveningoutpost/dexdrip/Services/Ob1G5CollectionService.java
:Line 972
Before:
android_wear = (getResources().getConfiguration().uiMode & Configuration.UI_MODE_TYPE_MASK) == Configuration.UI_MODE_TYPE_WATCH;
After:
android_wear = getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH);
Adding at the top of the file:
import android.content.pm.PackageManager;
The patch applied on
app/src/main/java/com/eveningoutpost/dexdrip/Services/DexCollectionService.java
:Lines 821 - 829
Before:
After:
Adding at the top of the file:
import android.content.pm.PackageManager;
Files changed:
Files where
Configuration.UI_MODE_TYPE_WATCH
is present:https://github.com/NightscoutFoundation/xDrip/search?q=Configuration.UI_MODE_TYPE_WATCH
Beta Was this translation helpful? Give feedback.
All reactions