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

76 Commits

Author SHA1 Message Date
cpfeiffer
2003d56190 Cleanup package blacklist handling
Didn't find a cause for #664, though.
2017-04-22 16:59:55 +02:00
Andreas Shimokawa
742615c6f4 prevent rare NPE in onNotificationRemoved() 2017-04-02 00:04:55 +02:00
Andreas Shimokawa
7a6b0ed2b0 support material fork of K9 2017-03-16 17:24:15 +01:00
License Bot
e392fbfd80 Add license header to all java files. 2017-03-10 14:53:19 +01:00
Andreas Shimokawa
f35e3e460d remove K9 receiver as is works better with generic notifications 2017-02-09 17:35:46 +01:00
Daniele Gobbetti
b894c01822 Make the media notification receiver more robust.
Sometimes the media notification does not contain the expected components, hence the code covered by the try/catch has been adjusted. This was reported in #533 for VLC.
In the future the whole media handling will probably be refactored.
2017-02-05 15:13:26 +01:00
cpfeiffer
13af1c1e11 Ignore Gadgetbridge's own notifications
Fixes #411
2017-01-27 00:23:45 +01:00
Andreas Shimokawa
ce67bf2c52 Pebble: make the feature to automatically delete notifications from the pebble optional
(This is not pebble specific at all but as long as other devices do not use that it will stay in the Pebble specific preference screen)
2017-01-15 00:10:40 +01:00
Andreas Shimokawa
fda317671a Ignore summary information for k9 mail
(#373)
2017-01-09 18:34:22 +01:00
Andreas Shimokawa
8c0f5599a1 Do not try to remove notifications from the device in some obvious cases 2017-01-09 16:49:11 +01:00
Andreas Shimokawa
3644d5e7a6 Pebble: remove notifications when dismissed on the phone (#326)
Most of the code is generic, so it could be implemented by other devices.
I dont know what happens if multiple messages arrive in the same notification.
So, this is experimental.
2017-01-09 16:33:00 +01:00
Hasan Ammar
0ba377bb42 Show K9 message body in notifications 2017-01-02 19:03:02 -05:00
Andreas Shimokawa
b5225145d4 Fix crash with unknown notification sources on Mi Band (maybe other non-Pebble devices also affected)
Pebble low level code had an own check for notification type being null, no we set it to UNKNOWN early
This regression was introduced in 0.15.0 though "Revamp Notification types Pebble (#453)"

Fixes #468
2016-12-24 22:00:24 +01:00
Daniele Gobbetti
846c74aa86 Forward also group summary notifications, if they contain wearable actions. Hopefully helps with #456
Tested with conversations and there is no regression. Also a specific workaround for telegram was removed, hopefully this does not break #395
2016-12-18 18:00:16 +01:00
Daniele Gobbetti
f1965c7b00 Log the flags also when passing the notification to device #456 2016-12-18 11:03:54 +01:00
Daniele Gobbetti
861c655b5d Log the incoming notification flags.
Should help further diagnosing #456
2016-12-18 10:40:30 +01:00
Daniele Gobbetti
bb5791485c Add log statements when notifications are not sent to gadget
This should help debuggin #456
2016-12-11 22:48:12 +01:00
Andreas Shimokawa
17b581022b optimize imports 2016-12-09 20:14:17 +01:00
Kevin Richter
34296c021f Revamp Notification types Pebble (#453)
* Remove notification switches for enum & hashmap
* Fix code style
* Fix null reference exception
* Add whatsapp support
* Remove duplicate entry
2016-12-09 17:54:19 +01:00
Julien Pivotto
67937dd6ee Mark 3rd party facebook apps notifications as Facebook
- Toffeed: https://f-droid.org/repository/browse/?fdid=me.jakelane.wrapperforfacebook
- Slimsocial: https://f-droid.org/repository/browse/?fdid=it.rignanese.leo.slimfacebook
- MaterialFBook: https://f-droid.org/repository/browse/?fdid=me.zeeroooo.materialfb

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2016-10-28 07:23:54 +02:00
Andreas Shimokawa
cc2b22cfc7 prefer BIG_TEXT extra from notification only for email
(Some messengers accumulate messages in BIG_TEXT)
2016-10-19 18:38:26 +02:00
Andreas Shimokawa
336ffd5bf7 Extract EXTRA_BIG_TEXT instead of EXTRA_TEXT if available.
This makes K9 Mail usable with only using generic notifcations on Android >=5
(It shows the message preview now)
2016-10-18 23:44:00 +02:00
Andreas Shimokawa
cd195a5969 map more apps to notification types (icons and colors on the pebble) 2016-10-11 11:54:52 +02:00
cpfeiffer
92c629c351 Ranem NotificationType.UNDEFINED to UNKNOWN 2016-10-10 23:06:44 +02:00
Daniele Gobbetti
fabc52fdad Don't forward group summary notifications to the wearable, they are meant for the android device only
Possibly also related to #395
2016-09-27 17:33:10 +02:00
Andreas Shimokawa
fd03dac5cd Pebble: try to work around duplicate Telegram messages
(#395)
2016-09-22 09:31:14 +02:00
Andreas Shimokawa
8080734470 Pebble: use telegram icon for telegram messages
also use the facebook icon for the official facebook app
(untested because we would never use facebook)
2016-09-21 21:31:23 +02:00
Andreas Shimokawa
ec1f539267 revert accidentially commited stuff 2016-09-11 00:38:26 +02:00
Andreas Shimokawa
053b9553bc correct changelog (pebble health is also affected by userid and deviceid swapping) 2016-09-11 00:36:04 +02:00
Andreas Shimokawa
e1927733ba remove special handling for conversations (latest release removed pebble messages) 2016-09-10 23:53:24 +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
6de002c88b also try to get track number and number of tracks from notifications 2016-06-10 22:20:55 +02:00
Andreas Shimokawa
66b5a21cf2 also gather music info from notifications when screen is off 2016-06-10 00:03:48 +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
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
Normano64
31eabe9605 Fixed things based on feedback 2016-05-19 23:58:13 +02:00
Normano64
8a91628322 Detects if Do Not Disturb is in use.
Can handle sms and phone calls from priority senders when in Priority
only, but doesn't handle events and reminders.
2016-05-19 16:34:59 +02:00
cpfeiffer
e35ce978bd Remove now unused imports + fix one more SharedPreferences usage 2016-04-25 23:43:19 +02:00
cpfeiffer
0c715a2669 Wrap access to SharedPreferences with "Prefs"
(to centralize quirk handling)
2016-04-25 23:18:55 +02:00
Andreas Shimokawa
a15b327ff1 Refactoring: get rid of ServiceCommand, use new CallSpec and MusicSpec to pass Call and Music info 2016-04-04 20:08:34 +02:00
cpfeiffer
7a224243a3 Try to quit Gadgetbridge by stopping the service 2016-04-03 00:49:54 +02:00
Andreas Shimokawa
e6f68f445a Ignore generic notification when from SMSSecure when SMS Notifications are on.
This should improve (not fix) #214
Still, we cannot decrypt SMS, so if you use SMSSecure as the default SMS App
you should disable SMS Notifications which enables generic notifications for
SMSSecure which are already decrypted.
2016-01-22 21:30:50 +01:00
Andreas Shimokawa
0b53f60b0d Pebble: EXPERIMENTAL support for replying to wearable notifications
Tested with Signal, more could work.
2016-01-09 17:54:17 +01:00
Andreas Shimokawa
55989c426c fix double SMS on Android 6.0 2015-12-27 19:22:10 +01:00
danielegobbetti
9acdefd5c1 Treat sony SMS app as such for notifications. 2015-12-19 14:30:35 +01:00
Andreas Shimokawa
05a8436f7c Treat notifications from Signal as chat messages 2015-12-06 16:10:46 +01:00
cpfeiffer
bd0716ba58 Some more lint warnings fixed 2015-11-23 23:04:46 +01:00