Fossil-HR-SDK icon indicating copy to clipboard operation
Fossil-HR-SDK copied to clipboard

How might this be used to get access to data exposed through a 'normal' android wear complicator?

Open renegadeandy opened this issue 3 years ago • 12 comments

I am interested in how this SDK can be used to get access to data from an App called AndroidAPS which has a complicator for android wear watch faces.

Please see the code base for android wear project for this here: https://github.com/nightscout/AndroidAPS/tree/master/wear This has complications (the data exposed via these is what I want to show on the Hybrid HR watch face.) -watch faces etc which I am not interested in.

The complications code is : https://github.com/nightscout/AndroidAPS/tree/master/wear/src/main/java/info/nightscout/androidaps/complications

Any thoughts feelings etc would be great - I don't have a huge amount of experience with this side of development so I am not sure if this complication uses BLE (think it must) and whether we can get access to that kind of link via this Fossil-HR-SDK or not.

Hoping for some positive news!

Other possible approaches here, would be if this SDK would allow me to drive a RESTful endpoint and display response data on the watch face- it will also be totally fine!

renegadeandy avatar Nov 18 '21 11:11 renegadeandy

I don't quite get it. The SDK can be used to write apps and watch faces for the Fossil HR, that's it. If you just want to display a dynamic widget and push data to it from the phone, you can already do that using Gadgetbridge and custom widgets.

The SDK does not provide any endpoint to interact with the widgets, Gadgetbridge does. Anything higher you'll have to do using tasker or write your own all.

So, that exactly is it that you want to achieve?

dakhnod avatar Nov 18 '21 11:11 dakhnod

Ah - so (!) maybe this is possible out of the box and it's my limited understanding of the watch and software that creates the confusion.

For clarity.

I am considering buying a Fossil Hybrid HR watch - https://www.fossil.com/en-gb/smartwatches/explore/hybrid-hr/

I want to be able to show a complication on a Hybrid HR watch from the app androidAPS : https://github.com/nightscout/AndroidAPS/tree/master/wear -- That's my goal. Can that be done with Gadgetbridge?

renegadeandy avatar Nov 18 '21 11:11 renegadeandy

Is there a way to get the data from AndroidAPS to tasker? Because from there, you can forward it to Tasker using Intents.

dakhnod avatar Nov 18 '21 11:11 dakhnod

I don't know what Tasker is....? But probably.....

renegadeandy avatar Nov 18 '21 11:11 renegadeandy

Tasker is an app to create little programs on your phone, like take data from AndroidAPS and forward it to Gadgetbridge

dakhnod avatar Nov 18 '21 14:11 dakhnod

Alright, so I did a bit of digging:

AndroidAPS does not have any interface to other apps on the phone so far. Thus, forwarding any Information out of AndroidAPS to Tasker does not seem possible AFAIK.

What you could do, (I suppose at least) is configurung AndroidAPS to forward the data to nightscout and forwarding it from there to Gadgetbride via Tasker or Automate.

This would require an active internet connection, though. Maybe there is another hacky way, but that's the best I can do for now.

dakhnod avatar Nov 18 '21 15:11 dakhnod

Yep your suggestion would work.

Another alternative is, I use 'diabox' app to grab the blood glucose data - this is then sent to NightScout and read by AndroidAPS.

Diabox has a 'integrate with other apps' switch - so I think it exposes a local restful endpoint like xdrip does, but i cant find any docs on it!

renegadeandy avatar Nov 18 '21 15:11 renegadeandy

Sounds like we could solve this together. Could you share the google play link of diabox with me? Or even better, the source code on github or something?

dakhnod avatar Nov 18 '21 15:11 dakhnod

I downloaded it from : https://www.bubblan.org/apkplz/ -- you can see some details here!

renegadeandy avatar Nov 18 '21 16:11 renegadeandy

There is not alot of useful source code available there. What you are searching for is some sort of integration with other apps, best thing would be an Intent broadcasted to all apps whenever new data is available in diabox.

Easiest way for you would be to open an issue here, asking for that.

dakhnod avatar Nov 18 '21 16:11 dakhnod

INteretsingly - you cannot add issues to that repo!

renegadeandy avatar Nov 18 '21 21:11 renegadeandy

In that case you might have to drop him an email.

dakhnod avatar Nov 19 '21 15:11 dakhnod