This issue is for coordinating the Gadgetbridge devs (working on pebble support) and pebble developers who are willing to support Gadgetbridge specifically.
It is mostly meant for developers, but everyone who has good ideas to share is welcome to do so. However off-topic questions and comments will not be tolerated.
With the release 0.17 Gadgetbridge added support for weather data, and in the future the currently running watchface/watchapp will have a background JS runtime just like the official app (well, a subset of it). (There's a branch for that)
Unlike the official app, watchfaces/apps are currently unable to access the internet. We have plans to allow some kind of internet access (see #302) but:
The question is what is the best way to provide these data to each watchface/app, and that's why we would like to hear the opinion of developers.
The approach that sounds more promising to me at the moment is:
Theoretically, this could allow each watchface/watchapp to detect if it's running within official Pebble app or Gadgetbridge (by checking for the Gadgetbridge object) and choose wether to fire XHR requests to fetch the weather or wait for the Gadgetbridge event to be fired: either way it will get data, process them and then push them the usual way.
Once we find agreement on the basics (please note that what described above is just a proposal!) we can start discussing details like the exact format of the data, how to best document this new "API" etc.etc.
pinging @ashimokawa , @krayon and @tilden .
Here are my 2垄:
DataProviders.on('weather') would allow for cross-compatibility without name reuse if alternative phone apps for pebble are made.Well weather is something we have already and would be immediately available to watchapps. Other info already available are location and sunrise/sunset time. I didn't mention them explicitly as they are in the response by openweathermap but I probably should have.
Adding methods to the Pebble js object instead of creating a new one is of course also an option.
Other info already available are location [...] as they are in the response by openweathermap
I assume you mean reverse geocoding? :) Geolocation is being exposed through the standard api in PebbleKitJS and I strongly urge you to continue the trend of using standard JS apis whenever possible.
In general, I think that this (WearableKitJS? :P ) be kept as platform-agnostic as possible. The Pebble object only provides access to Pebble-specific things鈥攏otifications, webviews, watch info, account/watch tokens鈥攁nd, therefore, Pebble is a good name for it. Similarly, GadgetBridge would be a good name for GadgetBridge's configuration API.
Conversely, weather will eventually (hopefully) be provided by other wearable phone apps as well. I don't feel strongly about how this is named, but it would be really great if it'll be something others can use as well :)
Super happy to see this progress :D
I'm the dev behind GoProRemote, I agree with @jneubrand , maybe the app page in GB could have a internet toggle, and when its on a way to input allowed origins (eg for my case it would be the camera IP).
Please add your remarks re internet access in #302, thanks!
I'd love if GadgetBridge provided a way to trigger specific intents (and get responses through PebbleKit maybe).
@SuperPichu please post your comment to #189
Since master supports (optionally) background javascript execution I'm closing this.