Xdrip: Support for Android Wear 2.0 Complications

Created on 9 Apr 2017  Â·  88Comments  Â·  Source: NightscoutFoundation/xDrip

Hi,

Android Wear 2.0 is coming very soon for many smart watch owners and it has one pretty cool API to use with xDrip+: the Watch Face Complications[0]. I already branched and started working on it, thinking that it would be quite easy: the class just needs to extend the ComplicationProviderService and implement an asynchronious method onComplicationUpdate, allowing the user to display xDrip data on any Android watchface, basically removing the need for separate watchfaces only for xDrip.

I realized the current watchfaces take the value updates as callbacks from the xDrip running on the mobile phone, but here the watchface itself should trigger the updates and the new provider should reply with the values the watchface wants to display. This made me think for a while... I either need:

  • A class that gets the updates from the phone, caches them and reports to the watchface. Sounds kind of wrong to me, because I don't have control over the instances and if I cache the updates, I need to keep them in a global variable; no good.
  • A class that when the watchface asks for data, the class asks the latest value(s) from the xDrip running on the phone and reports them back. This eats a bit more battery but makes the code design nicer.

Both of the options mean the values are a bit older than the ones on the phone or the watch is using more battery if it asks for new data too often.

I'd like to hear some ideas how to move forward and if any of these two options is the way to go, some hints how on earth the value update works between the watch and the phone. The prize is basically to create infinite amount of different possibilities how the watch looks like while still having the most important information visible.

Regards,
Julius

[0] https://developer.android.com/wear/preview/features/complications.html

Most helpful comment

Awesome work here guys. Not sure if each watch is different in terms of complications and/or bluetooth connection to phone but I have had no issues from the first build that included complications. Each build after I had no changes and watchface complication always has data. The ONLY time it did not is when the actual collection service on phone was not working with G5 for a bit. I have Tag Connected 45 with Samsung G8+ and working very very well.

All 88 comments

Any thoughts about this @kskandispersonal ?

The main code you'd want to look at is in ListenerService.java if you are interested in data being exchanged between phone and watch. The ListenerService sends a LocalBroadcast of the BG data received from the phone to the Watchface in the onDataChanged method. The xdrip Watchface, for eg., BaseWatchFace.jave, onReceive method processes this data for display on the watch. The data received from the phone is triggered in a number of ways, including by the phone itself when it receives a bg reading from the transmitter, via request from the phone menu "Resend glucose to watch" request, a request from the watch, etc. This "request" is similar to what you describe in your 2nd bullet. So XDrip+ already supports such a request to integrate in a complication. Again, see the methods I mentioned above.
Also, if the collector runs on the watch, there is no need to request the data from the phone. The watch maintains its own database on the watch when running the collector (i.e., when Force Wear is enabled).
I haven't looked into supporting Complications yet. Unfortunately, my watch, the Sony Smartwatch 3, does not support Android 2.0. Hwr, I think it is just a matter of "Exposing Data to Complications"), as described in your link. In our case, the BG data, perhaps other data such as BG delta, time delta, and other optional status fields should be exposed. Then it is up to the Watchface user to add whatever fields they want to display.
Do you have a watch which supports Android 2.0? If so, we could try exposing such data and you could test it out.

I'm having a Sony Smartwatch 3 wrapped over the Freestyle Libre and then Huawei Watch on my wrist to show the glucose values. The Huawei will get the 2.0 update and right now I'm able to install a developer preview to test things out.

Thanks for the tips. I think I'll try to write the code myself, with the info you provided and what I already thought of writing I think it's doable in a couple of nights for code review. I have a working development environment for xDrip and I already did the InfluxDB support before, so I know a bit how to navigate in this codebase.

I'm a Rust/Clojure developer during my work hours, so please bear with me if my Java is not always following the best practices :)

Was there anything in particular that you had to do to get the watch face to load on AW 2.0? I cannot seem to install the watch face now that my LG Urbane 1st edition has upgraded to it.

EDIT:
I was able to get this working by following various stackoverflow guides and upgrading the min/compileSdkVersion and tweaking a few other settings. If anyone is interested I can submit a pull request, but I'm guessing that pimeys work would be a better place to source it from at this point.

I haven't tried the new API yet, had a super busy week at work and completely tired now... My Huawei Watch didn't get the update yet, so I either need to install the preview edition or wait. Of course I can start the development with the API, but it would be very nice to see it working and see is this new API useful at all.

@chrisprad I guess it would be good to provide a patch now so people's systems will not get broken when they get the AW 2.0 update.

I started writing the code today and it should be pretty straightforward. So I have my listener service providing only the BG values for testing (extending it with subclasses for other information when I get this working). The complication data is going to be the BG value as SHORT_TEXT with an optional title, which would be the unit (mmo/l or mg/dl).

Some questions. because I can't really test this with real device yet:

  • I store the latest sgvLevel, sgvString, rawString, delta and timestamp from the update callback. I kind of know what each of these are, but could somebody provide me information what they contain. Like, I THINK sgvString might be the blood glucose in the configured format (which is set in xDrip), but I'm not sure. Is the value just the number as a string or is there the unit also included?

And if the unit is not included, it would be nice to get it somehow. The SHORT_TEXT accepts maximum of seven characters as a value, so adding the unit directly in there is not possible, but doabie in the optional title field.

The other option would be to use the RANGED_VALUE, where again we need to check the configured unit from xDrip, set the minimum (in my case 2.2 mmol/l) and maximum (22.2 mmol/l). With this type of field it is also possible to set a title, which would be the unit, but the watchface don't have to show it.

Now what I'm looking for is that exact current BG value what I see in xDrip right now. In that format and an indication of the value unit, so I can build this service for both units.

Another update: you can actually set the complications to work in push style, so when the BroadcastReceiver onReceive() is called, you can call requestUpdate which will trigger updates to defined complication providers.

Basically what I want to do for the first test branch is a provider for blood glucose values, where we have three different types for data:

  • RANGED_VALUE between 2.2 and 22.2 (or 40 and 400), having an optional title of the unit (mmol/l, mg/dl).
  • SHORT_TEXT the text value and the unit as an optional title
  • LONG_TEXT the text value with unit, delta and minutes, e.g. 5.5 mmol/l +0.01 1', LOW or HIGH

If I don't get the AW 2.0 update next week, it would be nice if somebody like @chrisprad would test the change with a proper device. I could install the preview, but I seriously want to wait the OTA.

Here's the first draft:

https://github.com/pimeys/xDrip-plus/tree/watch_complications

I have no clue if it works yet, but when I get the AW2 update I'm very eager to test this. Meanwhile if somebody wants to test this and maybe even finish/extend it before I get my hands to the new OS, I would be very happy. :)

pimeys,

When I get a chance I'll try to demo your changes.

One thing to consider: I think you have to use "flavors" to create both wear 1.x compatible xDrip release apks as well as standalone 2.0 wear projects. At least that's what developers on stack overflow seem to think. It's also kind of a pain to install, since the watch only accepts apps from the play store or side loaded through adb.

Hopefully this weekend I'll be able to load your changes up and give them a spin.

@chrisprad Is there a good documentation somewhere how much work this would be? I'll try to get some time on next week again for writing this.

@pimeys

Yep, this is a relatively short document and mirrors my experience locally:

https://developer.android.com/training/wearables/apps/packaging.html

For a quick explanation just scroll down to the gradle section to see how it's setup. For xDrip I did the following (probably badly named):

android {
 ...
    compileSdkVersion 25
    buildToolsVersion '25.0.2'
...
    defaultConfig {
        applicationId "com.eveningoutpost.dexdrip"
        minSdkVersion 20
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
...
    }
...
    productFlavors {
        wear2x {
            minSdkVersion 24
            versionCode 2
        }
        wear1x {
        }

    }
}

Is there really no way to install the existing wear 1.x micro apk on wear 2.0 using the menus?

I heard that play store on the watch did allow it but through some obscure slightly hidden option? I also heard that when upgrading a watch to wear 2.0, if the xdrip watchface was already on there then it remained. If it is compatible then it seems odd if there isn't a menu driven way to allow the installation.

I don't have any devices which work with wear 2.0 and its going to be very awkward if debug based side loading is the only way to do it.

@jamorham There may be some way I'm not aware of, but I was unable to find it.

I have been unable to open the play store on my watch since I don't connect using wifi and bluetooth doesn't seem to work. I just get a "Retry connection" over and over. Wear 2.0 seems completely focused on the standalone watch experience, which my watch is only sorta-kinda capable of (LG Urbane 1x).

It IS true that your 1.x watch face remains. I made the mistake of uninstalling it when trying to get newer versions installed, and after that I was unable to install the old version. The system did seem to run it, so you may be right that it's simply a software barrier in the way.

They seem to be attempting to make a hard line in the sand between wear 1.x and 2.x, so I do think it will be difficult/annoying to debug without a wear 2.x device. I'm willing to do some debugging over the weekend since it seems like I'm the only person with a wear 2.x device currently.

I've used for a couple of days a Huawei Smartwatch 2, using Wear 2.0 and it works, but not as collector.
It means you can see std xDrip screen, any of the 4 options, but it can't work as Sony SW3, that is the one I use today.
You install the app via PlayStore in the watch, but it seems to be working as a watchface only.
Apologies for not being able to bring more to this topic, I sent the watch back to Amazon.

Sorry for being quiet for a while, but I got a new Dexcom system that I run now with xDrip and finally the AW2 update to my Huawei, so I guess I'll be testing this through the weekend.

I would be really interested to see how you get on with this, given that Android Wear 2.0 can display data from apps on any watch face it would be nice not to be limited to the Xdrip pre-defined watch faces which whilst very informative are pretty ugly.

I see a few mentions of Android Wear 2 and the Huawei Watch. What makes the Sony SW3 work as a standalone collector but not the Huawei? Is there anyway for me to help with testing/debugging of this for the developers?

I only have the SW3 watch so development is geared toward it. It uses standard BLE so other watches which support standard BLE also work as the collector. I believe the LG Urbane with Wear 2.0 also works as the collector. If you'd like to help and you have the Huawei watch, you could test it with Force Wear enabled and also enable Sync Wear Logs. See the watchguide for instructions on enabling these preferences. It is located under the Documentation directory.

@kskandispersonal I did that and I was posting screenshots to xDrip G5 Facebook group with no comments being made. Should I post screenshots here?

Oh, sorry, I try to respond to xDrip G5 FB but apparently missed your postings. The gitter channel, https://gitter.im/jamorham/xDrip-plus, is more timely for direct conversation re: issues and testing. You could open a new issue here on xDrip GitHub specifically for the Huawei Wear 2.0 (since it is not directly related to this issue, Wear 2.0 Complications).

Any further update as to complications working in AW2 with xdrip?

Ok, now, let me open this up a bit as the original developer who wanted to investigate how to add a complication for xDrip:

The biggest problem is the complication system itself: basically the watchface decides when it wants to update the values. xDrip watchfaces update the values when the transmitter has new data. My idea was to cache the value to the complication class and call an update function which SHOULD update a new value, but it never did. So at least for my case, using complications as they are currently is definitely worse than having an automatically updating graph in my watch. If the glucose value is 30 minutes late, I don't really care if it looks pretty.

There's a link to the pull request in this post. If somebody wants to continue the work and try to find a way to always display the latest value through complications, I'm definitely happy to test and give help in this proces...

But right now I get the most out of the big graph watchface.

As a parent of a T1D I'm interested to hear if anyone has managed to get this working as a Dexcom follower. Have the Huawei 2 Classic with 2.0

Think this article: https://www.smashingmagazine.com/2017/01/bringing-app-data-every-user-wrist-android-wear/
explains exactly what you want to do.
I just got the AW2 update this morning on my ZenWatch.
I've done a couple of simple forays into Android development, but I'm mostly a novice (prefer Unix Server Development in C++ -- Java kind of makes me ill).

Anyway, if I get the time (and that's a big if), I may try and git your branch to see if I can make it work. Assuming this branch is still the way to go?

@heygar Google's own documentation is better though. https://developer.android.com/training/wearables/watch-faces/complications.html

But the biggest problem here is, that whatever your transmitter is, it's been read approximately every five minutes by xDrip and the value immediately shown in the device you're wearing. The complication's main purpose is, that the watchface should ask the value to be displayed from the complications provider. It looks like, that you can define to look frequently, but it's just an suggestion that actually can be overriden.

Here's my code so far https://github.com/pimeys/xDrip-plus/tree/watch_complications

As you can see I added a listener for BG data updates, and try to enforce a complication update. I also got a problem instantizing the classes correctly, if you look into the debug log. I'm also a backend developer focusing on Rust and Clojure, so I'm not so happy with Java and Anrdoid API's :)

How hard would it be to modify the Nightwatch app functionality that allows access to Dexcom share server data to work on a stand alone 2.0 watch face? Particularly with AW 2.0 on iOS.

THANK YOU. That is exactly what I am looking for. I have iPhone but love AW2.0 but cannot find a combination for any way to get blood sugar on watch with this combo. Any insight would be awesome.

I am a Android developer in my free time. I haven't done anything with wear though. I'm willing to learn. Anyone in particular I should get in contact with?

Any further development with this? Xdrip+ is way more advanced than the Dexcom G5 app and all that it's missing is a complication for AW2. That would make this even better!!!!

So I have blindly implemented a complication data provider in xDrip+ I have no idea if I have done this correctly as I only have android wear 1.x

If you would like to try this, please download the Sept 13th nightly and let me know what happens? If this works then we can look at refining the support.

Ok. Is it the one linked that you have updated??

On Sep 13, 2017 6:15 PM, "Jamorham" notifications@github.com wrote:

So I have blindly implemented a complication data provider in xDrip+ I
have no idea if I have done this correctly as I only have android wear 1.x

If you would like to try this, please download the Sept 13th nightly and
let me know what happens? If this works then we can look at refining the
support.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/NightscoutFoundation/xDrip/issues/101#issuecomment-329312498,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ActA9vvriDdZF6uIsgm9yG1TCcIQcJ1Mks5siFPvgaJpZM4M4KE6
.

Works on my lg sport. Would be great if a direction arrow could be added
as well.

On Sep 13, 2017 5:15 PM, "Jamorham" notifications@github.com wrote:

So I have blindly implemented a complication data provider in xDrip+ I
have no idea if I have done this correctly as I only have android wear 1.x

If you would like to try this, please download the Sept 13th nightly and
let me know what happens? If this works then we can look at refining the
support.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/NightscoutFoundation/xDrip/issues/101#issuecomment-329312498,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZ_4SIYkdabV2VjR1h-ghAN29hFW-Hrbks5siFPvgaJpZM4M4KE6
.

@tswire you can download it from here: https://github.com/NightscoutFoundation/xDrip/releases or select the Nightly update channel in the App, if you don't see nightly then select alpha first and then go out and in to settings and nightly option should become visible.

@recursive-descent can you confirm that the complication updates as it should? Are you using mg/dl or mmol/l ?

@pimeys how much space do we have to display the data? what happens if it is oversized? I assume it will be able to handle unicode so we can use slope arrows. I think we should now look at improving the support probably using the work you have done previously for this. I haven't studied it in detail.

@jamorham You could try to add more complication data types, such as LONG_TEXT or that RANGE value. The watch face will then decide how much space there is and which version to fit.

Damn, I just uninstalled my custom xDrip to try this version and now the watch app doesn't install anymore to my AW 2.0 device. Hopefully I can force install it without getting the cable from home.

@pimeys Is it done like this ?

On Android Wear 2.0 watches you need to install (activate) the wear component separately from the Play-Store on the watch (under the section "Apps on your phone") after installing xDrip+ on the phone.

@pimeys do we know ahead of time how much space there is a in a short type?

@jamorham

TYPE_SHORT_TEXT

Type used for complications where the primary piece of data is a short piece of text (expected to be no more than seven characters in length).

https://developer.android.com/reference/android/support/wearable/complications/ComplicationData.html

So 22.2 is the longest possible value shown here? Then you have three extra characters for the short text, so you can fit in an arrow.

Another option is to use the short title, which is shown in many watchfaces under the actual value, like so:

new ComplicationData.Builder(ComplicationData.TYPE_SHORT_TEXT)
    .setShortText(ComplicationText.plainText(numberText))
    .setShortTitle(ComplicationText.plainText(deltaValue OR "mmol/l" OR "mg/dl"))
    .setTapAction(complicationPendingIntent)
    .build();

And of course I'd recommend adding support for the long text type too, which could hold all the important data, such as the glucose value, delta value and minutes from the last measurement. I'm trying to test these currently, but my android studio is still giving hiccups.

@pimeys this is very helpful thank you

@jamorham No, thank you for actually getting a working complication out! This works on my watch, I just want all the possible data visible, so I feel safer when biking home today.

I plan to update the short text very soon

After further review the complication does not update after the first one
after watch power-up.

@recursive-descent Which watchface you're using? For me it works with the default Google watchface, but what you have found here might be the same I noticed some months ago, that some watchfaces don't get the updates that often.

@recursive-descent out of interest, if you tap the complication does it update?

I updated the support for this in today's nightly. It should include trend arrow and delta. Does it work??

I have the 09 15 version installed and no arrows that i can see. I am using
it on Tag android wear with default "Interactive" theme with complications
and I seem to be getting updates regularly. Fyi.

On Sep 15, 2017 8:54 AM, "Jamorham" notifications@github.com wrote:

I updated the support for this in today's nightly. It should include trend
arrow and delta. Does it work??

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NightscoutFoundation/xDrip/issues/101#issuecomment-329774483,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ActA9tSS1_uxuByI1h1CJawW9gvIz38yks5sinN2gaJpZM4M4KE6
.

Arrows and delta are displaying now. Still having the issue of only
updating once, at the initialization of the watch from power up. Deleting a
watch face and adding it doesn't change anything. The complication doesn't
update.

On Fri, Sep 15, 2017 at 8:19 AM, tswire notifications@github.com wrote:

I have the 09 15 version installed and no arrows that i can see. I am using
it on Tag android wear with default "Interactive" theme with complications
and I seem to be getting updates regularly. Fyi.

On Sep 15, 2017 8:54 AM, "Jamorham" notifications@github.com wrote:

I updated the support for this in today's nightly. It should include
trend
arrow and delta. Does it work??

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
329774483>,
or mute the thread
uxuByI1h1CJawW9gvIz38yks5sinN2gaJpZM4M4KE6>
.

>

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NightscoutFoundation/xDrip/issues/101#issuecomment-329780338,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZ_4SPk1v0lE7PDGr5ZdG5xqSE8CZaO_ks5sinlhgaJpZM4M4KE6
.

@jamorham https://github.com/jamorham In answer to your previous
question. I've tried the complication on multiple watch faces. All are
standard issue from the mfg.

On Fri, Sep 15, 2017 at 8:25 AM, E.J. McKernan ejm@recursive-descent.com
wrote:

Arrows and delta are displaying now. Still having the issue of only
updating once, at the initialization of the watch from power up. Deleting a
watch face and adding it doesn't change anything. The complication doesn't
update.

On Fri, Sep 15, 2017 at 8:19 AM, tswire notifications@github.com wrote:

I have the 09 15 version installed and no arrows that i can see. I am
using
it on Tag android wear with default "Interactive" theme with complications
and I seem to be getting updates regularly. Fyi.

On Sep 15, 2017 8:54 AM, "Jamorham" notifications@github.com wrote:

I updated the support for this in today's nightly. It should include
trend
arrow and delta. Does it work??

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
issuecomment-329774483>,
or mute the thread
ActA9tSS1_uxuByI1h1CJawW9gvIz38yks5sinN2gaJpZM4M4KE6>
.

>

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NightscoutFoundation/xDrip/issues/101#issuecomment-329780338,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZ_4SPk1v0lE7PDGr5ZdG5xqSE8CZaO_ks5sinlhgaJpZM4M4KE6
.

Does either of you see the delta value, like +0.1 displayed anywhere?

Yes. The items displayed: actual reading, arrow and delta.

On Sep 15, 2017 8:57 AM, "Jamorham" notifications@github.com wrote:

Does either of you see the delta value, like +0.1 displayed anywhere?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NightscoutFoundation/xDrip/issues/101#issuecomment-329790347,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZ_4SGuYpA4rpIK7SbYgOLmUi6jDbrsxks5sioJHgaJpZM4M4KE6
.

@recursive-descent I wonder if it can be related to your collector, what data source is the phone that the watch is connected to using to get glucose data?

Fyi. Got the arrow and delta as I had to uninstall a d reinstall the xdrip
on the watch itself. Can the font be made bigger or is that dependent on
the complication and watchface?

On Sep 15, 2017 10:21 AM, "Jamorham" notifications@github.com wrote:

@recursive-descent https://github.com/recursive-descent I wonder if it
can be related to your collector, what data source is the phone that the
watch is connected to using to get glucose data?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NightscoutFoundation/xDrip/issues/101#issuecomment-329796845,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ActA9vc6usOuxZU-MUxyB6NeEBmymSfGks5siofzgaJpZM4M4KE6
.

This is a bit off topic but does anyone know if it's even possible to convert the Nightwatch app (or add a similar thing for xDrip) to only be on the watch for the purposes of using it to access Dexcom share data?

I use my AW with iOS for what it's worth.

Sent from my iPhone

On Sep 15, 2017, at 10:49 AM, tswire notifications@github.com wrote:

Fyi. Got the arrow and delta as I had to uninstall a d reinstall the xdrip
on the watch itself. Can the font be made bigger or is that dependent on
the complication and watchface?

On Sep 15, 2017 10:21 AM, "Jamorham" notifications@github.com wrote:

@recursive-descent https://github.com/recursive-descent I wonder if it
can be related to your collector, what data source is the phone that the
watch is connected to using to get glucose data?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NightscoutFoundation/xDrip/issues/101#issuecomment-329796845,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ActA9vc6usOuxZU-MUxyB6NeEBmymSfGks5siofzgaJpZM4M4KE6
.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Any chance of some photos so I can see how it looks? Thanks.

screen

I've got an Asus Zenwatch 3. It's also not updating when I'd expect it to, but I'm still experimenting with the settings. I have it on there twice so the hands aren't blocking it at 12, 3 and 9 :)

Sorry for the bad pick and can't figure out how to rotate it!

20170915_113047 002

I tried removing one of the data points (at 12:00) and re-adding it. Now it looks like this (notice the temperature changed, but the CGM reading did not):
screen

I will have another look at the updating code to see if I can get it to work properly for everyone. It is supposed to notify the watchface to come and get the data when new data arrives.

I am assuming that tapping on the complication doesn't cause it to update?

@jamorham https://github.com/jamorham The phone (pixel w/Android 8.0.0)
is running xdrip+ with a G5 data source.

On Fri, Sep 15, 2017 at 9:21 AM, Jamorham notifications@github.com wrote:

@recursive-descent https://github.com/recursive-descent I wonder if it
can be related to your collector, what data source is the phone that the
watch is connected to using to get glucose data?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NightscoutFoundation/xDrip/issues/101#issuecomment-329796845,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZ_4SA7zRxRBFVckXDauDUY3ZgYazEd2ks5siofzgaJpZM4M4KE6
.

Tapping the complication had no effect. I tried restarting the watch thinking maybe some stuff just needed to gel. And we should always try turning it off and back on again. Now, both data points read old/null and refuse to update :(. But, it is getting warmer!

I'm using G4 with the xBridge Wixel.
screen

Here's a screen print of mine.[image: Inline image 1]

On Fri, Sep 15, 2017 at 11:31 AM, Gar notifications@github.com wrote:

Tapping the complication had no effect. I tried restarting the watch
thinking maybe some stuff just needed to gel. And we should always try
turning it off and back on again. Now, both data points read old/null and
refuse to update :(. But, it is getting warmer!

I'm using G4 with the xBridge Wixel.
[image: screen]
https://user-images.githubusercontent.com/16446666/30493347-5c3fedb2-9a09-11e7-9a07-83a4d36d83e6.png

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NightscoutFoundation/xDrip/issues/101#issuecomment-329832989,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZ_4SJPMZJn4HNw7_2MSVrxLukv_Htseks5siqZ7gaJpZM4M4KE6
.

Something I noticed is that when the collector (my phone) has stopped getting readings (which happens a lot on Galaxy S8 due to bluetooth turning off) the complication showed old/null. Once I got my phone getting readings again, the complication immediately updated. So not sure if this is related or not but definitely something to look at. Also, a bit off topic but I cannot find the "correct" bluetooth/xdrip settings that work best for Samsung Galaxy S8+....still getting random disconnects and capture rate has never been that good. Any ideas?

More info.
The xdrip+ app on the phone "always" receives the G5 and updates
accordingly.

On Fri, Sep 15, 2017 at 12:09 PM, tswire notifications@github.com wrote:

Something I noticed is that when the collector (my phone) has stopped
getting readings (which happens a lot on Galaxy S8 due to bluetooth turning
off) the complication showed old/null. Once I got my phone getting readings
again, the complication immediately updated. So not sure if this is related
or not but definitely something to look at. Also, a bit off topic but I
cannot find the "correct" bluetooth/xdrip settings that work best for
Samsung Galaxy S8+....still getting random disconnects and capture rate has
never been that good. Any ideas?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NightscoutFoundation/xDrip/issues/101#issuecomment-329842049,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZ_4SHZDc17s3P2SBlsj0EeE0KNYyR0_ks5siq88gaJpZM4M4KE6
.

Just doing some reading on this and came across this thread. Wish I had a better knowledge of android development to lend more technical support in this area.

@tswire - It's not clear to me from this thread, but did you find the answer to what you were looking for?

I know a few people who would be very interested in connecting an android watch to an ios device, and them using a simple watchface (something like NightWatch) to 'follow' the blood sugars of someone else.

Please let me know if this is now possible, and if so, any guidance on how to set this up would be much appreciated.... thank you!

@apabari - Sorry, I know it's not clear because I was using an iOS device with Android Wear watch and was hoping for a solution to have something work on AW2 while paired to iPhone...however, I switched to Samsung Galaxy S8+.....so now I am just testing the complication implementation by these awesome guys!!! FYI, working ALL day with no hiccups on my watch....updates as the phone app updates and been great. Was able to work with PujiBlack watch face and customized it to show complication of my sugars!! yes...12.9 mmol is a bit high so no comments :-)
20170915_162807 002

Not sure if it helps in your debugging, but if my phone has a valid value and my watch reads old/null, tapping on the complication does nothing.
If my watch has a valid value, but from a long time ago (greater than 5 minutes) and my phone has also timed out has a line through the value, then tapping on the complication changes the watch to read old/null.
So tapping on the complication is having some effect. I just don't know what it's doing. It won't update to the correct value, but it will tell me that the value is old. Very odd. I blame it on Android Wear.

To further obfuscate things, I can get the complication to update by disabling, then enabling the "Enable Wear Collection Service" on the phone.
If I leave it disabled, it doesn't update and if I leave it enabled, it doesn't work.
The only time it updates is if it's disabled (no check mark) and I enable it (check mark added).

I can set myself I reminder to disable and enable every 5 minutes :)

@tswire - Thanks. That's disappointing for me, but I am glad you now have a working solution.

I do hope someone is able to come up with a working solution for iPhone users with Android watches though.

Can confirm the issues. Started a new G4 sensor today morning, and after the two hour wait

  • I couldn't get anything else than old/null as the complication value
  • When reseted the wear database, the values suddenly became visible
  • The values don't update anymore though. When tapping the values I get the old/null again

I need to say that with the old sensor, before having a two-hour pause with the measurements, all was working perfectly.

As of release "build 18th Sep 2017" I'm getting complication updates for
every transmission.

[image: Inline image 1][image: Inline image 2]

Updated today to today's build Sep 19. Really like the old/39 display. I assume that's the minutes since the last read.
screen

Unfortunately, I watched the watch face change from old/34 to old/39 while my phone said, "91 1 minute ago".
Good news is the watch face complication is updating! Bad news is it's not grabbing the actual blood sugar value. I verified I can still get it to update by turning off/on the "Enable Wear Collection Service" (most of the time).

-- Right after I finished clicking the Add Comment button, my watch face successfully updated without intervention! Maybe is just needed all the bit fluxes to work themselves out.

@heygar That value is minutes since the last read, yes. It's for debugging purposes for now, we actually have no idea why the complication provider can't get the new values from the database. Feel free to join in Gitter if you want to help...

Awesome work here guys. Not sure if each watch is different in terms of complications and/or bluetooth connection to phone but I have had no issues from the first build that included complications. Each build after I had no changes and watchface complication always has data. The ONLY time it did not is when the actual collection service on phone was not working with G5 for a bit. I have Tag Connected 45 with Samsung G8+ and working very very well.

My problems started when I changed a new sensor for G4 and waited that two hours warm-up. After that the value doesn't update anymore. The only way to get the latest value is by tapping Reset Wear DB from the phone.

@pimeys where is the Gitter site you mentioned a couple posts back?

Thanks.

For those working on this can you see if you can add the decimal with a 0
after any reading showing that is even (ie 8.0 or 7.0 rather than 8 or 7)?

On Sep 19, 2017 11:27 AM, "Julius de Bruijn" notifications@github.com
wrote:

@tswire https://github.com/tswire https://gitter.im/jamorham/xDrip-plus

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NightscoutFoundation/xDrip/issues/101#issuecomment-330574642,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ActA9p3kDIU8UQMiOZIVhCJF3m7PKTonks5sj9vlgaJpZM4M4KE6
.

Well crap, spoke too soon. Firmware updated on my Tag last night and now I am getting exact same issues of NULL XXX unless I force something with resetting Wear DB or uncheck and check wear collector.

Please everyone test the 29th Sept nightly. We believe this resolves the issue with complications failing to update.

It is working flawlessly now. Readings always update. Direction arrows
working as well.

On Sep 29, 2017 11:57 AM, "Jamorham" notifications@github.com wrote:

Please everyone test the 29th Sept nightly. We believe this resolves the
issue with complications failing to update.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NightscoutFoundation/xDrip/issues/101#issuecomment-333180727,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZ_4SAV1ZM8-m9gI-H5KrFFOpQ3yaXkqks5snSGBgaJpZM4M4KE6
.

Working like a charm here too. Just would like some idea what does different shortenings mean now. I get sometimes for the bottom part stuff like 2S or 1S instead of a delta.

Okay so the way it currently works is there are two different views of the complication.

  • The first view shows the glucose number and the delta.
  • The second view shows the glucose number and the time since the reading.

By tapping slowly on these you can alternate between them. I think all complications will update to reflect the last change you had. So if you have multiple on a watchface and you change one, the other(s) will switch to that mode as well on the next update.

If you tap twice within one second (but not too fast) then it will bring up the treatment entry keypad and the complication should stay on the mode it was on.

There may be more useful modes possible in the future. It should be relatively easy for someone else to modify the CustomComplicationProviderService class now that the core functionality is working. The time since information may not be that useful because the complication doesn't update that frequently. But I used it for debugging mainly.

Alles gut! Been working like a charm today. Thanks for finding a nice solution.

Marking as resolved.

Anyone that can help me with this?

I would love to chat with you tswire, please tell me you are still there. I need informations concerning Tag Heuer

Hey. I no longer use android or android wear so stopped following. However I still may be able to help. What’s up?


From: JayBouch1977 notifications@github.com
Sent: Monday, July 9, 2018 8:58 p.m.
To: NightscoutFoundation/xDrip
Cc: tswire; Mention
Subject: Re: [NightscoutFoundation/xDrip] Support for Android Wear 2.0 Complications (#101)

I would love to chat with you tswire, please tell me you are still there. I need informations concerning Tag Heuer

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/NightscoutFoundation/xDrip/issues/101#issuecomment-403665285, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ActA9jCdVKUYbFj2eHKxepm2Q9cFN79Jks5uE_wzgaJpZM4M4KE6.

tswire - I am considering getting a Tag connected. Could you confirm this device still runs xdrip+?

Do you have a basic guide of how you got it to work together? Can you use the watch with the sensor + maio maio without having the phone?

I have been looking at the connected for a few weeks but just wanted to be confident it would be suitabke before I purchased.

Hello all,
I have a question concerning the wear 2.0 and xdrip complication.

I have Xdrip installed on my watch and i can easily chhose between seeing my blodd sugar on an interactive watch face (in a cricle on the main watch face) or having Xdrip directly as a watch face (with the graphic and numbers).

My question: I was wondering if there is a way to acces the graphic by clicking on the watch face complication? When i click on the watch face complication now, what it does is changing the number of second since last BG received or having the difference between last BG and new BG), what i would likc is getting the app showing graphic when i click on the watch face complication.

Thank you, i hope it is clear :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

exceter picture exceter  Â·  4Comments

ARkaine2 picture ARkaine2  Â·  3Comments

Navid200 picture Navid200  Â·  6Comments

malloy139 picture malloy139  Â·  6Comments

aeonsablaze picture aeonsablaze  Â·  12Comments