Commit Graph

29 Commits (962720145e3678f5ffd17ea6c4a9e277a665b144)

Author SHA1 Message Date
cpfeiffer 962720145e Fix custom language being lost for newly created activities
So we do need to set the language both on change and onCreate()

For some reason, the title bar of the SettingsActivity is not updated on recreate().

Closes #787
2017-09-03 01:04:34 +02:00
Andreas Shimokawa c2af2dd15c Pebble: Pass booleans from Javascript Appmessage as such and convert to int16 later when sending to pebble
https://developer.pebble.com/guides/communication/using-pebblekit-js/#type-conversion
2017-07-28 23:54:29 +02:00
License Bot e392fbfd80 Add license header to all java files. 2017-03-10 14:53:19 +01:00
Daniele Gobbetti e7846f4754 Pebble: override the native navigator.geolocation GetCurrentPosition
The native method requires FINE location permission, and we don't have it. Further we should handle the runtime permission request.
2017-02-25 13:31:48 +01:00
Uwe Hermann 0746aaa579 app: Random typo and consistency fixes. 2016-12-01 20:22:12 +01:00
Daniele Gobbetti 84327a5b86 Pebble: use also the device address as seed to store app configuration
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.
2016-11-27 11:31:03 +01:00
Daniele Gobbetti 1a22752b98 Pebble: enable localStorage
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.
2016-11-14 17:51:33 +01:00
Andreas Shimokawa bdf403210e Pebble: Fix configuration of certain pebble apps
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
2016-10-28 00:03:50 +02:00
cpfeiffer c59553c9c9 Rename GBDevice#hardwareVersion to model
(e.g. while DeviceType is "PEBBLE" in general, the model
might specify a Pebble Time or Time Steel.
2016-08-26 20:57:59 +02:00
Daniele Gobbetti 1430619c30 Implement watchapp configuration presets.
This is a quick & dirty solution that may be improved by storing multiple presets in the DB in the future.
2016-06-26 11:55:08 +02:00
Daniele Gobbetti ad3f7e53b3 Try hard to hide the browser activity from the stack. 2016-06-18 21:08:51 +02:00
Daniele Gobbetti 966c3d4811 Various improvements to the configuration page:
- localstorage is now cleared at every launch: this prevents some clay configuration pages to send back to the watch a number of keys that were set by other configuration pages
- only execute JS on document ready: this prevents some race conditions
- added dummy getTimelineToken function to Pebble JS object
- corrected (hopefully!) a few logic errors in the JS code (this referenced where it wasn't)
- refactored the steps visualization in JS
- lifecycle changes to the java activity: now the configuration page gets closed as soon as the settings have been sent, and there is only one instance of it
2016-06-18 18:40:57 +02:00
Daniele Gobbetti d5586478f3 Support legacy configuration pages #251
There are pages that do not honor return_to get parameter. This commit allows the user to enter the returned url manually.
2016-06-17 17:47:13 +02:00
Daniele Gobbetti 42acb8915a Pass the integer keys to pebble, even if they are not within the known app keys. Requested in #251 2016-05-31 12:24:28 +02:00
Andreas Shimokawa 4bcebca744 Work towards dark theme, remove -v21 specific theme definition 2016-04-14 15:21:25 +02:00
Lem Dulfo 70ed14243f Remove all getActionBar occurences, temporary fix for overlap 2016-04-10 21:11:52 +02:00
Lem Dulfo 5a3004cbce AppCompat and FAB, more Material Design 2016-04-10 21:11:41 +02:00
danielegobbetti 1933e2bf10 Localize the title of the configuration activity.
Auto open local settings (e.g. clay)
2016-03-21 21:19:32 +01:00
Andreas Shimokawa 4be1926459 reformat code though Android Studio 2016-03-20 15:00:05 +01:00
Daniele Gobbetti 538961fd2c Add some style, intercept and display toast in case of JS errors 2016-03-18 17:50:24 +01:00
danielegobbetti ea855a4cc2 Also open public URLs with an external browser. 2016-03-13 08:31:50 +01:00
danielegobbetti d378b4eb7b Intercept clay pebblejs://close url 2016-03-08 21:44:12 +01:00
Daniele Gobbetti 6d4b98719a Implement some further JS methods to make additional watchapps happy 2016-03-04 17:44:42 +01:00
Andreas Shimokawa 1e44bb03fb Pebble: convert Boolean to String for app configuration 2016-03-03 16:02:30 +01:00
Andreas Shimokawa 2a7f9226a0 Pebble: send configuration to watch
TODO: handle booleans
2016-03-03 14:23:17 +01:00
Andreas Shimokawa fa924ff9d8 Pebble: fix crash when navigating back from configuration activity 2016-03-03 13:05:51 +01:00
Andreas Shimokawa 860ded1022 refromat code 2016-03-03 11:54:07 +01:00
Andreas Shimokawa 63d938559e pass GBDevice down to ExternalPebbleJSActivity to determine the platform version (aplite,basalt,chalk) 2016-03-03 11:52:30 +01:00
Daniele Gobbetti 089a59168e Initial support for using an external browser for configuring pebble apps. This allows existing configuration pages to work without having internet access ourselves.
This is a better approach as initially thought in #191.

What is missing is outlined in the (several) TODOs.
2016-03-02 21:07:27 +01:00