Commit Graph

1428 Commits (cd84b891d9b2651bb98e42e1b9fd880c47745f04)

Author SHA1 Message Date
cpfeiffer 1997a9b7fa some more service discovery logging 2016-07-18 23:55:44 +02:00
Carsten Pfeiffer c3d7b4a7cf Merge pull request #357 from rplevka/rplevka-srings
Fixed 'Activiy' typo in strings.xml
2016-07-15 20:49:32 +02:00
cpfeiffer 802314fc13 Updates for 0.11.2 release 2016-07-15 00:48:50 +02:00
cpfeiffer 7b26986ab0 Fix for #349
We must not use UUID_CHAR_PAIR anymore. This prevents connecting
without being bonded. Connecting when bonded still works.

As without bonding, ControlCenter would not display the device anymore,
we have to re-install the "remember last connected device" in the
preferences thing.
2016-07-15 00:13:49 +02:00
Roman Plevka e8a4c28510 Fixed 'Activiy' typo in strings.xml 2016-07-14 23:15:36 +02:00
cpfeiffer ebda3e1535 uncomment some constants 2016-07-14 20:37:20 +02:00
cpfeiffer 367091587f No more 0x8 in the logs
It's the confirmation that setting the latency succeeded.
2016-07-14 20:15:54 +02:00
cpfeiffer aa00d2f93a Avoid NPEs when device-name is null 2016-07-12 00:24:23 +02:00
cpfeiffer 76895aa2b1 Register to device name and alias changes and update accordingly 2016-07-11 00:28:15 +02:00
cpfeiffer 80930ce42a More logging for pairing, destroy pairing activity when bonding failed #349 2016-07-10 00:11:28 +02:00
Andreas Shimokawa 340a0f4a66 Fix coordinators not recognitzing devices by name
Do not ask a device candidate for its name , ask the underlying BluetoothDevice
The candidate uses the device alias - not good for matching
2016-07-09 23:10:21 +02:00
cpfeiffer f54163faeb centralize quit() functionality in GBApplication 2016-07-08 22:35:52 +02:00
cpfeiffer 9215233344 Whitelist 4.16.3.7 Mi1S firmware 2016-07-08 22:17:19 +02:00
cpfeiffer 8154a887cb When there are cached services, skip service discovery 2016-07-08 22:15:36 +02:00
cpfeiffer ce47f62c5b Missed a word in changelog 2016-07-08 22:01:01 +02:00
cpfeiffer 31c9d7ed3b Updated changelog for 0.11.1
(cherry picked from commit 563af6d0175b5ff415085fe562f4cf03ab364098)
2016-07-06 23:58:21 +02:00
Andreas Shimokawa 8ea0fa46fb update spanish translation from transifex (THANKS!) 2016-07-06 22:36:29 +02:00
Andreas Shimokawa 26bab26917 bump version update changelog 2016-07-06 22:35:41 +02:00
Andreas Shimokawa 4de45787c3 Properly acquire network location if last location is not known
A toast will be shown if the network location provider is disabled.
Location will be automatically acquired after enabling it.

Fixes #346
2016-07-05 23:56:14 +02:00
cpfeiffer 20d8732d10 In GBDevice.toString(), return the correct state instead of the simplified one 2016-07-05 23:36:21 +02:00
cpfeiffer 154b7d28bb Let discovery activity also display device aliases 2016-07-05 23:36:21 +02:00
Andreas Shimokawa 903890067d Settings: properly check the input type flag
Fixes a bug where latitude/longitude could be made empty
2016-07-05 23:14:48 +02:00
cpfeiffer 94cc1a883a Use GBActivity in Pairing Activity for theming 2016-07-05 22:13:11 +02:00
cpfeiffer 3bb1a228ec Fix crash during device discovery 2016-07-05 21:48:33 +02:00
Andreas Shimokawa 43f95aee9c fix NPE 2016-07-05 21:47:51 +02:00
cpfeiffer 9ae69eac55 Avoid NPEs when BluetoothDevice.getName() returns null 2016-07-05 21:03:30 +02:00
cpfeiffer 9881b6c281 Do not display paired devices in the discovery activity 2016-07-05 20:46:47 +02:00
cpfeiffer abeb642972 Don't remember paired Mi device in preferences
(this was just a very old workaround for an even older Mi firmware
that couldn't pair)
2016-07-05 20:27:23 +02:00
cpfeiffer 8549031c6f Only attempt to reconnect when we were previously initialized 2016-07-04 23:38:25 +02:00
cpfeiffer 91d1cea51f Avoid potential NPEs 2016-07-04 22:40:24 +02:00
Andreas Shimokawa 73b2fc357e Pebble: Add some Pebble Time 2 support - NOT WORKING
Not working because these are expected to use BLE.
The Emulator should work though.
2016-07-04 22:09:56 +02:00
Andreas Shimokawa 966b9abb87 preferences: set longitude/latitude inputType to "numberDecimal|numberSigned"
allows you to live west of 0°E ;)
Also pops up a better keyboard
2016-07-03 22:07:14 +02:00
Andreas Shimokawa a2c2e48719 fix NPE in settings when last known position is null
This is not a proper fix, we would have to request a location first.
I just had a last known position when testing before. :/

Issue #346
2016-07-03 21:29:02 +02:00
cpfeiffer 8b24e098ea Set sampleProvider to avoid NPEs 2016-07-01 00:22:54 +02:00
cpfeiffer f65afa64d9 log raw activity data from mi band, closes #341
Hopefully aids in deciphering activity kinds.
2016-06-28 23:23:29 +02:00
cpfeiffer f0da25c49b Fix activity fetching getting stuck when double tapping #333 2016-06-28 23:07:24 +02:00
cpfeiffer 7613b62dab Improved discovery mechanism #323
Does not rely solely on mac addresses anymore. Should help when
mac address randomization is used.
2016-06-28 00:35:50 +02:00
cpfeiffer 76a44ad3a4 more logging to detect problems with external dirs: #343 2016-06-27 22:01:52 +02:00
cpfeiffer 56615de1f0 log FileNotFoundException when checking if directory is writable or not: #343 2016-06-27 21:29:39 +02:00
cpfeiffer e70a2290c3 sampleproviders now return device specific data #206 2016-06-27 20:43:48 +02:00
Andreas Shimokawa 358cd6df5e update German translation 2016-06-26 19:01:39 +02:00
Andreas Shimokawa 07283d4a75 update Japanese from transifex (thanks!) 2016-06-26 18:00:18 +02:00
Daniele Gobbetti 69be5dbbc7 Set the json directly instead of using parseconfig
Some watchfaces do some processing on the incoming json, and we are storing the json after the fact, and double parsing isn't good.
2016-06-26 14:13:47 +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
Andreas Shimokawa 339eaf05aa update german translation 2016-06-25 19:51:55 +02:00
cpfeiffer 2fa166e381 Fix potential NPE, setup environment earlier 2016-06-25 18:58:54 +02:00
Andreas Shimokawa 0209b1b403 add translations from transifex (thanks!) 2016-06-25 18:26:44 +02:00
Andreas Shimokawa b5cf2b20be Pebble: In App Manager, enable adding of "Send Text" system app on non-aplite platforms
The App is not functional with Gadgetbridge, but since it is visible on the watch when canned messages for call dismissal is enabled, we support sorting it.
2016-06-25 18:08:53 +02:00
Daniele Gobbetti 20e2846d00 Enable localization of appmanager tab strip 2016-06-25 11:27:56 +02:00
Daniele Gobbetti 0f0a7ea925 Add send sms system app (commented because it only appears on Time series Pebbles after setting up SMS call decline) 2016-06-25 11:19:01 +02:00
Andreas Shimokawa 0a1ef37c14 bump version, update changelogs 2016-06-24 21:51:02 +02:00
Andreas Shimokawa 181df7311a add missing file 2016-06-24 14:57:01 +02:00
Andreas Shimokawa 659165fa4c Pebble: fix new app manager on 2.x
- properly intert apps reported from pebble into the corresponding tab
- disable tracking of installed apps
- disable drag and drop for apps and watchfaces
- ...
2016-06-24 13:39:29 +02:00
Andreas Shimokawa 1de6ee019f Pebble: fix regression. FW 2.x was completely broken
No one noticed, so it seems we can kill 2.x support soon :D
2016-06-24 12:07:44 +02:00
Andreas Shimokawa b77f3ad3bf Pebble: Implement call dismissal with canned messages
This also moved the canned replies setting to pebble settings
(we will change that if we have another device supporting this)
2016-06-24 10:25:08 +02:00
Gergely Peidl 5131d50617 Hungarian translation improved. 2016-06-22 10:42:35 +02:00
Andreas Shimokawa 67e5bc0434 Pebble: implement decline call with SMS
Based on a proposal by @danielegobbetti, thanks!

This still does not enable the feature since the necessary blobdb is not filled yet
2016-06-21 00:31:53 +02:00
Andreas Shimokawa 72dff2abd2 provide haptic feedback on long press in AppManager 2016-06-20 17:50:19 +02:00
Andreas Shimokawa 1a9c40e790 fix crash when rotating screen in AppManager 2016-06-20 17:42:32 +02:00
cpfeiffer 45fa930ac3 Properly check support for heartrate measurements 2016-06-19 23:22:28 +02:00
cpfeiffer 8772631087 Merge branch 'db-refactoring' 2016-06-19 22:53:09 +02:00
Andreas Shimokawa 4347f134d6 Pebble: add Music, Alarms, Notifications and Watchapps to System Apps
They can be ordered too!
2016-06-19 21:48:07 +02:00
cpfeiffer 9772d8af06 Merge remote-tracking branch 'origin/master' into db-refactoring 2016-06-19 21:14:03 +02:00
Andreas Shimokawa 7597ce337d Pebble: do not move to last position if reinstalling an app, the order seems to be preserved on the pebble 2016-06-19 21:13:47 +02:00
Andreas Shimokawa 24e840e03b Pebble: remove "move to top" feature completely 2016-06-19 21:06:38 +02:00
Andreas Shimokawa 4b5969ef96 Merge branch 'master' into appmanager-fragments 2016-06-19 12:33:05 +02:00
Andreas Shimokawa f42899d910 Pebble: on FW 2.x do not send extended music info and do not send playstate
I don't think they are supported and I cannot test.
2016-06-19 12:17:19 +02:00
Andreas Shimokawa b2bae26d7d bump version, update changelog 2016-06-19 11:58:13 +02:00
Andreas Shimokawa 64182941d0 Pebble: always hide move to top feature in AppManager, it was not working as expected
A proper solution is in appmanager-fragments branch
2016-06-19 11:48:29 +02:00
cpfeiffer 7aa900ce82 Workaround crash in debug activity
(when progress dialog is visible and changing orientation)
2016-06-19 00:53:53 +02:00
cpfeiffer 0596c80381 Some migration fixes
especially: add unique index on samples using timestamp and device id
(since composite primary keys are not fully supported yet)
2016-06-19 00:40:51 +02:00
cpfeiffer 04c8a17d6e Merge remote-tracking branch 'origin/master' into db-refactoring 2016-06-19 00:12:02 +02:00
cpfeiffer 5607b1c892 Working merging of activity data, with (indeterminate) progress dialog 2016-06-19 00:10:47 +02:00
cpfeiffer dc932355b5 Some javadoc re DeviceManager 2016-06-18 23:40:37 +02:00
cpfeiffer 233a6155cc Add class DeviceManager that provides access to the list of managed devices
Basically moved code out of ControlCenter to a separate class. Also provides
change events when the device list has changed, or changes to the device
state have occurred.
2016-06-18 23:35:34 +02:00
Daniele Gobbetti 988f5ef1b2 Go back and show Toast if the watchapp doesn't really support configuration. 2016-06-18 21:17:38 +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 245b8655e7 Fixed typo #251 2016-06-18 21:01:32 +02:00
Daniele Gobbetti 6749c493b1 Changelog for app configuration 2016-06-18 19:13:03 +02:00
Daniele Gobbetti 7263307409 Merge remote-tracking branch 'origin/master' into appmanager-fragments 2016-06-18 19:00:23 +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 fffeb87607 Use constant instead of hardcoded string 2016-06-18 18:33:35 +02:00
cpfeiffer 2890fd6737 Merge remote-tracking branch 'origin/master' into db-refactoring 2016-06-18 01:27:19 +02:00
cpfeiffer 41e6833b2d Getting closer... db migration almost works. 2016-06-18 01:26:36 +02:00
Andreas Shimokawa 22b4e15988 Merge pull request #335 from geripgeri/hungarian-translation
Hungarian translation added. :)
2016-06-17 23:03:28 +02:00
Andreas Shimokawa e8f2a0bc9f Merge branch 'master' into appmanager-fragments 2016-06-17 22:47:17 +02:00
Andreas Shimokawa 79b439da28 Implement App Sorting
- grab icon to move apps
- cache can be sorted but nothing will be send to watch
- if sorting apps or watchfaces, order will be sent to watch
- we try to keep track of what is installed and what not

Firmware 2.x is currently not working properly
2016-06-17 22:43:06 +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
Gergely Peidl 33d8ea2f56 Hungarian translation added. :) 2016-06-17 14:48:10 +02:00
cpfeiffer 13959677af More WIP for intrgrating old activity db into new one
(one demand to keep user in control)
2016-06-17 00:07:50 +02:00
cpfeiffer d544509b60 Merge remote-tracking branch 'origin/master' into db-refactoring 2016-06-16 21:55:16 +02:00
cpfeiffer 687beee501 Migration work 2016-06-16 21:54:53 +02:00
Andreas Shimokawa 65ac4b364f Merge branch 'master' into appmanager-fragments 2016-06-16 01:09:35 +02:00
Andreas Shimokawa 9f61458790 Pebble: Allow installation of aplite apps on diorite 2016-06-16 00:59:15 +02:00
Andreas Shimokawa b79b94809a initial support for FW 4.0-dp1 2016-06-16 00:24:27 +02:00
Andreas Shimokawa 1c6c78507c Merge branch 'master' into appmanager-fragments 2016-06-15 22:53:41 +02:00
Andreas Shimokawa d225743d64 Pebble: some preparations for Pebble 2 2016-06-15 22:53:05 +02:00
Andreas Shimokawa 7937fd6ea7 Merge branch 'master' into appmanager-fragments 2016-06-15 22:36:06 +02:00
Andreas Shimokawa 7690ad3af6 make appmanager usable again 2016-06-15 22:29:30 +02:00
Daniele Gobbetti 4120d686b8 Some key events were not working with the default audio player. Reported in #322 2016-06-15 22:15:21 +02:00
Andreas Shimokawa b5693bcb45 play around with drag and drop list 2016-06-15 19:56:34 +02:00
cpfeiffer 71d99384c1 Cleanup, remove duplicated code, fix some TODOs 2016-06-14 23:10:35 +02:00
Andreas Shimokawa 4895704f99 add missing file 2016-06-14 22:55:38 +02:00
cpfeiffer a01507a924 Merge remote-tracking branch 'origin/master' into db-refactoring 2016-06-14 20:14:04 +02:00
cpfeiffer 61957d6cb0 WIP: more db work 2016-06-14 20:13:08 +02:00
Andreas Shimokawa 3418543c31 play around with fragments 2016-06-14 20:04:54 +02:00
Andreas Shimokawa 1d6a697000 playing around with fragments 2016-06-14 15:56:38 +02:00
Andreas Shimokawa 98999993e5 Pebble: In AppManager allow moving apps on the device to the top (context menu) 2016-06-12 01:20:12 +02:00
Andreas Shimokawa f20b659b86 update changelog again 2016-06-11 23:45:14 +02:00
Andreas Shimokawa f812fb1b1f Improvements to MusicPlayback receiver
- Also send duration if "duration" extra is present
- If "playing" and "postion" extras are present send a music state update

treat previous state and current state as equal if position delta is <=2 seconds
(Neccessary for some players which update every second - the pebble however counts by itself)
2016-06-11 23:37:03 +02:00
Andreas Shimokawa 2d080cabb2 fix NPE by using Objects.equals() 2016-06-11 22:32:38 +02:00
Andreas Shimokawa d1a62968f6 Do not send new audio metadata to device if nothing has changed
This prevents some players which send a metadata changed intent every second to drain the battery
2016-06-10 23:13:33 +02:00
Andreas Shimokawa 8d3bd494b4 fix broken xml tag 2016-06-10 22:45:38 +02:00
Andreas Shimokawa 771ff7b2be bump version, update changelog 2016-06-10 22:39:00 +02:00
Andreas Shimokawa 6de002c88b also try to get track number and number of tracks from notifications 2016-06-10 22:20:55 +02:00
Andreas Shimokawa 243250f41f update translations from transifex (thanks!) 2016-06-10 00:08:00 +02:00
Andreas Shimokawa 66b5a21cf2 also gather music info from notifications when screen is off 2016-06-10 00:03:48 +02:00
Andreas Shimokawa b76619bb5b Pebble: implement app reordering in PebbleProtocol
Not yet used.
2016-06-09 23:14:40 +02:00
Andreas Shimokawa fd31bfe56b Merge pull request #325 from stepardo/steffen/pocketcasts_notifications
Set extended music info by dissecting notifications on Android 5.0+
2016-06-09 23:12:17 +02:00
Steffen Liebergeld c5262869d9 Use names for playstates
These names need to be mapped to device specific constants in the
device code.
2016-06-09 20:02:55 +02:00
Steffen Liebergeld 91f374edec Revert ""duration" parameter in onSetMusicInfo uses microseconds"
The decision on granularity of APIs is up to the maintainers.

This reverts commit 204748c518.
2016-06-09 20:02:55 +02:00
Steffen Liebergeld 204748c518 "duration" parameter in onSetMusicInfo uses microseconds
This is in line with Android, and saves some calculations (and thereby a
tiny little bit of battery life).
2016-06-08 20:43:46 +02:00
Steffen Liebergeld fb71cdf55b Add handling for media session notifications
Since Android 5.0, media players can have interactive notifications that
reside in the notification area, and offer up to 5 control buttons
(play/pause, next, previous, etc), and information about the currentlu
playing media file.

We use these notifications to get information about the currently
playing media file such as:
- artist
- track (title)
- album
- duration (length of the media file)
- play state (playing, paused, stopped)
- position
- play rate (how fast is the media file being played)

We then send this information up to the device.

On Pebble, the music app will display the title and the artist, as
well as a progress bar showing the current position. The progress bar is
animated when the media file is being played, and if it is being paused,
it displays a pause symbol.

This code will be skipped when GadgetBridge is run on a device with
Android version older than 5.0 (lollipop).
2016-06-08 20:41:43 +02:00
Steffen Liebergeld 73fbaf0a54 Restore previous working of the debug activity
The previous commits broke the debug activity's setting of the music
info. This commit restores this functionality.
2016-06-08 20:32:34 +02:00
Steffen Liebergeld e386d6da43 Add onSetMusicState(MusicStateSpec stateSpec)
This commit contains the infrastructure needed for the
NotificationHandler to send music state information to the device. That
is, it introduces a call onSetMusicState(MusicStateSpec stateSpec), that
in turn sets up an intent to the service, which will then call the
encodeSetMusicState() function of the device. encodeSetMusicState is
available for pebble only. There are empty stubs for other devices.
2016-06-08 20:31:48 +02:00
Steffen Liebergeld 1d5c8bae9d MusicStateSpec: introduce new class describing the music state
Contains:
- state
- position
- playRate
- shuffle
- repeat

This is close to what PebbleProtocol currently supports.
2016-06-08 20:22:56 +02:00
Steffen Liebergeld 0470731e4b PebbleProtocol: Do not call encodeSetMusicState in encodeSetMusicInfo
encodeSetMusicState will be accessible on its own. If it was used to set
the music state, a call to encodeSetMusicInfo must not reset this info
arbitrarily.
2016-06-08 20:16:33 +02:00
Andreas Shimokawa 32429df7bc Pebble: allow to enable or disable sync for each activity tracker in settings
This is useful if you have multiple phones and do not want to have your data synced to one of them
2016-06-07 22:51:14 +02:00
Steffen Liebergeld 389a143bdb Set music info for PocketCasts
PocketCasts tells about its current media state via notifications. This
patch tries to parse incoming notifications from PocketCasts and if
successful tells the device about it. Currently supported are track and
artist.
2016-06-07 19:34:37 +02:00
cpfeiffer ae548d0806 WIP: more work, compile again 2016-06-06 23:18:46 +02:00
cpfeiffer 3b87966fe9 Merge branch 'master' into db-refactoring 2016-06-06 22:16:40 +02:00
cpfeiffer 2b6ee41970 Add logging of heartrate values #318 2016-06-05 22:37:42 +02:00
cpfeiffer cb4dcf9fa6 Disable LoggingTest, fixes travis failures 2016-06-05 22:33:24 +02:00
cpfeiffer ca26e27c60 Basic support for Mi Band 2 #323, untested 2016-06-05 22:31:07 +02:00
Carsten Pfeiffer 1ed0dc59b2 Merge pull request #321 from pragmaware/mi-band-device-time-offset
Add support for shifting the device time by N hours
2016-06-05 22:29:44 +02:00
Andreas Shimokawa 0fb664c141 allow to switch languages at runtime 2016-06-05 14:33:09 +02:00
Andreas Shimokawa 9d3f3c57cd Pebble: make disabling of appmessage handlers more generic
Also disable morpheuz handler if morpheuz is not the chosen activity tracker
.... and bump reported version to 3.12 to match the latest pebble release
2016-06-04 21:50:26 +02:00
Andreas Shimokawa 321707af8f Pebble: ignore incoming misfit data if misfit is not set as the preferred activty tracker 2016-06-04 21:33:38 +02:00
Daniele Gobbetti 968d15c8d8 Keep the pebble health data on the pebble watch if the activity provider is not pebble Health.
This will nack all pebble health datalog messages. As mentioned in #322, this would allow to use multiple android device without secondary devices "sipping" the health data from the watch.
2016-06-04 18:21:49 +02:00
Szymon Tomasz Stefanek 60fc29cc4d Add support for shifting the device time by N hours to allow for sleep data gathering of shift workers 2016-06-03 04:43:12 +02:00
Andreas Shimokawa df4ae49b72 update Japanese translation from transifex (thanks!) 2016-06-01 00:01:08 +02:00
cpfeiffer 2e6536555b Fix previous commit (compile!) 2016-05-31 22:56:22 +02:00
cpfeiffer 9a106667d2 Setting the wear location appears to fail for amazfit #274
So as a test, disable that for amazfit. Let's see what happens
next.
2016-05-31 22:33:38 +02:00
Andreas Shimokawa 19d7c03545 Pebble: get rid of log spamming when changing applications (unhandled message) 2016-05-31 14:18:45 +02:00
Andreas Shimokawa a9d74b52f8 update German übersetzung 2016-05-31 13:34:29 +02:00
Andreas Shimokawa 1dd0965ae1 update Italian traduzione from transifex 2016-05-31 13:07:11 +02:00
Andreas Shimokawa 9da050c51d update changelog 2016-05-31 13:05:55 +02:00
Andreas Shimokawa a15d07858e Sunset/Sunrise: always use UTC timezone for calendar operations 2016-05-31 13:03:15 +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 0231e83ea3 try to fix duplicate/missing surise/sunset pins 2016-05-31 00:07:24 +02:00