This is similar to #247 but simpler and using a FAB, also it explicitly targets our Activity instead of allowing to open a video in a video player which using this feature
Also suggested in #520
- cleaned up the DeviceService.connect() variants
- discovery: pass the device candidate around instead of the mac address
Attempts to fix#512, #514, #518
If the weather notification app is not installed, link to fdroid (app if installed, web page of the app if not).
If the weather notification app is installed, show the options to activate and deactivate it.
Now native controls seem to work (including datepicker), still the webview is not started upon watchapp start, but when long-pressing each app in the app manager. After the webview is started it will live in the background until device disconnect.
- enable/disable weather app from the watchapp list
- convert weather data to a format that can be displayed by the system app
TODO: send the weather data periodically
Progress so far:
- webview is created upon watchapp launch
- webview is destroyed after disconnect
- ready event is fired in the background
- showConfiguration is fired upon webview display
live samples now report relative steps, not absolute to the current
day's stepcount.
Also live samples' steps should NOT be added to the database since
they are already counted in the regular stepcount.
This is not needed as long as one GB instance is used to manage a single pebble device, if multiple devices are managed the stored watchapp configuration could be messed up.
- pass service uuids to GBDeviceCandaidate so that DeviceCoordinators
can detect devices by their services.
Note: they should not rely on service uuids being available
Okay this might be stupid since Workout seems to work also works without HRM!
I assumed (wrongly) that I will disable Workout by disabling HRM
anyway, better than not being able to toggle it at all!
LocalStorage native functions are overridden to keep each watchface's settings separated. It's possible the bind method do not work on older versions of android.
for appkeys with index 0 it was assumed they were not found becaus JSONObject.getOpt() returns 0 if not found.
Use the getOpt() method variant with a fallback parameter instead and set that to -1 fixes the problem.
(Also fixes a missing debug output)
Fixes#419