1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-03 02:06:21 +02:00
Commit Graph

1341 Commits

Author SHA1 Message Date
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
Andreas Shimokawa
b71597800a Pebble: set device to reconnecting state when actively reconnecting
It makes it easier to watch connection attempts and the delay between them in control center.
2016-05-29 23:24:16 +02:00
Andreas Shimokawa
f2cbee39f1 update changelog again
actually the last commit is responsible for the fix (even though it is not mentioned in the commit log)
2016-05-29 23:02:00 +02:00
Andreas Shimokawa
33da6c2925 Pebble: make sure that "waiting for reconnect" state is set when initial connect fails 2016-05-29 22:58:25 +02:00
Andreas Shimokawa
4533c80c95 make sure to only reconnect when device is in "waiting for reconnect state" 2016-05-29 21:44:43 +02:00
Andreas Shimokawa
af14fb4f90 limit max charaters to longiute and latitude to 7 2016-05-29 21:40:56 +02:00
Andreas Shimokawa
2e8d96e995 add option to enable sunrise/sunset on the timeline
Also fix a small type Aquire -> Acquire
2016-05-29 21:29:27 +02:00
Andreas Shimokawa
c9aad271da update translations from transifex (thanks!) 2016-05-29 20:53:25 +02:00
Andreas Shimokawa
2b88720f83 fix xml changelog and add missing entry 2016-05-29 20:50:05 +02:00
Andreas Shimokawa
a13cd9d951 update changelog, bump version to 0.10.0
reasons for the bump are
- new permissing
- first contact with the timeline, although is is not very useful
2016-05-29 20:47:16 +02:00
Andreas Shimokawa
8970bbe044 display device address in info menu (IP:PORT / MAC) 2016-05-28 11:32:36 +02:00
cpfeiffer
2d49ce505a Set state to "Waiting for reconnect" for BTLE devices 2016-05-26 23:48:05 +02:00
cpfeiffer
50b7a02ef2 One more attempt at fixing dynamic logging reconfiguration
- moved out of GBApplication to class Logging
- the main thing is: when start()ing the FileAppender again, it *must*
- be configured to be non-lazy, otherwise it won't open the stream ever again.
2016-05-26 23:46:21 +02:00
cpfeiffer
6e33c7364a Remove some commented code 2016-05-26 22:21:58 +02:00
cpfeiffer
c360eb3392 This should fix some connection problems #274
Some APIs have become synchronous, it seems, e.g.
connectGatt() -> onConnectionStateChanged() -> discoverServices() -> onServicesDiscovered()
appears to happen synchronously. So connectGatt() will not return before services are discovered!

So now we deal with this situation.
2016-05-26 19:03:38 +02:00
Andreas Shimokawa
b0e0aec465 fix typo 2016-05-26 15:20:27 +02:00
Andreas Shimokawa
88f338b0b9 Reenable our discovery activity for Android 6
Now that we request location we are allowed to do a btle scan again
2016-05-26 14:58:36 +02:00
Andreas Shimokawa
7ef005f6a3 Allow getting the network location within pebble settings for sunrise/sunset calculation
It is also possible to set the location manually
On Android >=6 the required permission will be requested when pressing the button in settings.
2016-05-26 14:39:54 +02:00
Andreas Shimokawa
fa6100fcec Merge branch 'master' into feature-sunrise 2016-05-26 13:11:03 +02:00
Andreas Shimokawa
31c15bb8b8 update changelog 2016-05-24 23:55:03 +02:00
andre
bf66c25c7f MusicPlayBackReceiver set track, artist and album to the artist member of MusicSpec.
Now the assignment of artist, track and album is correct
2016-05-24 19:33:12 +02:00
Andreas Shimokawa
55a40f7b06 Sunset/sunrise: rotate ids and reuse the id from two days ago for tomorrow, this way we will have sunrise/sunset for 3 days while sending only sunrise/sunset per day 2016-05-24 14:46:22 +02:00
Andreas Shimokawa
e3bee37b81 Change UUID prefix to 0x4767744272646700 2016-05-24 13:20:16 +02:00
Andreas Shimokawa
cb1ec5dccb Make calendar event type byte instead of int
Now the UUID will be constructed like this:

High 64bit 0x4742474200 | type
Low 64bit id
2016-05-24 13:11:57 +02:00
Andreas Shimokawa
c9c9b420dc Pebble: Send sunrise and sunset events to the pebble every day using AlarmManager 2016-05-24 11:19:57 +02:00
Andreas Shimokawa
af3cfefec0 Merge branch 'master' into feature-sunrise 2016-05-23 23:52:39 +02:00
Andreas Shimokawa
30c37d3172 Pebble: only remove apps from app list when they got deleted from cache also 2016-05-23 23:46:54 +02:00
Andreas Shimokawa
884c4262cf update changelog, bump version
(also change one German string and remove two newlines :P)
2016-05-23 23:37:57 +02:00
cpfeiffer
4504c5b5a4 Add Activity Description table and order samples 2016-05-23 23:31:22 +02:00
Andreas Shimokawa
24c51deaf9 Pebble: also delete other files from cache when deleting .pbw 2016-05-23 23:15:07 +02:00
Andreas Shimokawa
f697906572 update Japanese and German tranlation from transifex (thanks!) 2016-05-23 22:03:21 +02:00
Daniele Gobbetti
bef59ae9c0 Parse new version of Pebble health datalog message with tag "84".
This message was previously treated as a further "Sleep" message type, with firmware version 3.12 further types were added that are clearly unrelated to sleep (possibly to high-intensity activities like running etc.), hence the related code is now moved to a separate class.

The only decoded records are still sleep-related.

Fixes #312
2016-05-23 21:13:12 +02:00
Andreas Shimokawa
437de7f660 fix duplicate entry in strings.xml 2016-05-22 23:38:51 +02:00
Andreas Shimokawa
efe5e546fd Merge branch 'master' into feature-sunrise 2016-05-22 23:36:09 +02:00
Andreas Shimokawa
80cf9fa8fe Pebble: allow to delete apps from pbw cache
Also remove delete entries from all system apps' context menus (not only health)
2016-05-22 23:32:25 +02:00
Andreas Shimokawa
30883ab244 Pebble: In AppManager mark cached apps with (C), installed apps on FW 2.x with (D) and (CD) if both is the case
Also always add pebble health as a system app to the list on devices that have it (no need to enable untested features for that anymore)
2016-05-22 22:48:45 +02:00
Andreas Shimokawa
5a20d7ec81 Pebble: no longer clear list of cached apps as soon as the installed watchfaces is received from Firmware 2.x
This will result in duplicate entries (first the whole cache, then actually installed watchfaces)
It might already make watchface configuation working on 2.x even though it is dirty

I wish everybody would just update to 3.x *sigh*
2016-05-22 12:30:47 +02:00
Andreas Shimokawa
ca714417ac Pebble: also copy pbw to cache on Firmware 2.x
Neccessary step towards watchface configuration on 2.x
2016-05-22 11:33:14 +02:00
Andreas Shimokawa
6370fdbebe Merge branch 'master' into feature-sunrise 2016-05-22 01:25:52 +02:00
Andreas Shimokawa
0d7986a5ab Pebble: rework incoming reconnection support
This is now completely generic and should work for other devices also

Fixes #296
2016-05-22 01:19:28 +02:00
cpfeiffer
d5cca84780 Small fixlets 2016-05-20 22:04:30 +02:00
cpfeiffer
0267ddb356 Merge branch 'master' into db-refactoring 2016-05-20 21:49:59 +02:00
cpfeiffer
400ae2bc3b Fix lint warnings using @TargetApi 2016-05-20 21:49:25 +02:00
cpfeiffer
fa34cf9a17 Merge branch 'master' into db-refactoring 2016-05-20 21:42:30 +02:00