Commit Graph

181 Commits (962720145e3678f5ffd17ea6c4a9e277a665b144)

Author SHA1 Message Date
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
cpfeiffer 1e24fa7ad8 Dummy weather notifucation config activity 2017-01-14 00:26:47 +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 984e639e97 Pebble: push current weather to TimeStylePebble again when watchface gets started 2016-12-31 19:17:08 +01:00
Andreas Shimokawa 266c6b8817 Pebble: send weather to Pebble when we get notified by weather notification 2016-12-31 15:56:05 +01:00
Andreas Shimokawa bcb522d2d0 Merge branch 'master' into feature-weather 2016-12-27 13:51:39 +01:00
Andreas Shimokawa 440a5e071f Try to support "Subsonic" android app (#474) 2016-12-26 23:53:24 +01:00
Andreas Shimokawa 6af95d99be Merge branch 'master' into feature-weather 2016-12-24 23:06:21 +01: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
Andreas Shimokawa 2148b431ea Merge branch 'master' into feature-weather 2016-12-19 23:32:53 +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
Andreas Shimokawa f74bb4e3f3 Merge branch 'master' into feature-weather 2016-12-12 09:05:19 +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 efb1cd389b Merge branch 'master' into feature-weather 2016-12-09 21:52:55 +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
Uwe Hermann 0746aaa579 app: Random typo and consistency fixes. 2016-12-01 20:22:12 +01:00
Daniele Gobbetti 16c4f1a5ca Pebble: add toggle to use last known location for sunrise and sunset
This adds the feature discussed in #415, the used location is the last recorded by the network location provider, if it's not available then the stored location is used.
2016-11-06 15:42:52 +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
cpfeiffer f54163faeb centralize quit() functionality in GBApplication 2016-07-08 22:35:52 +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
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 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 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
Andreas Shimokawa b0fe4b1519 also gather music info from notifications when screen is off 2016-06-09 23:39:00 +02:00
Andreas Shimokawa 9623449b6e Merge branch 'master' into feature-weather 2016-06-09 23:15:23 +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
Andreas Shimokawa 98a0774fc2 Merge branch 'master' into feature-weather 2016-06-07 22:53:40 +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
Andreas Shimokawa a15d07858e Sunset/Sunrise: always use UTC timezone for calendar operations 2016-05-31 13:03:15 +02:00
Andreas Shimokawa 0231e83ea3 try to fix duplicate/missing surise/sunset pins 2016-05-31 00:07:24 +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 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 b0e0aec465 fix typo 2016-05-26 15:20:27 +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
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 c9c9b420dc Pebble: Send sunrise and sunset events to the pebble every day using AlarmManager 2016-05-24 11:19:57 +02:00
Andreas Shimokawa ec154c9041 Merge branch 'master' into feature-weather 2016-05-24 11:09:21 +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
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
Andreas Shimokawa dafdb1008d Merge branch 'master' into feature-weather 2016-05-16 14:15:39 +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 adfef3db42 Prepare code for more music metadata (duration, track count, current track number)
Oh and format code
2016-03-27 17:45:44 +02:00
cpfeiffer 3f39928df5 Some more cursor-related improvements (closing) 2016-03-08 23:48:31 +01:00
cpfeiffer 9643fa6062 s/moveToFirst/moveToNext 2016-03-08 23:29:42 +01:00
cpfeiffer 87023ebdb3 Don't retrieve the column index again and again in a long loop
Also: fix weird iteration logic
2016-03-08 21:33:12 +01:00
Andreas Shimokawa ed85fd5011 convert byte and short values related to activity tracking to int
This avoids a lot of problems because java
- does not know unsigned values
- jvm and dalvic do not internally support byte and short
- sqlite does not know them either
2016-02-29 20:54:39 +01:00
Andreas Shimokawa c436c4c055 Pebble: Fix wrong(previous) contact being displayed on the pebble. Fixes #228 2016-02-20 22:20:02 +01:00
Chris Perelstein 60c7e9f6f6 Fix misspelling in exception notification. 2016-02-01 22:05:49 -05:00
Daniele Gobbetti c08d49d28e Merge remote-tracking branch 'origin/master' into feature-weather 2016-01-25 13:12:30 +01: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
danielegobbetti 4bb78722b5 Merge branch 'master' of https://github.com/Freeyourgadget/Gadgetbridge into feature-weather 2016-01-09 18:48:39 +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
danielegobbetti c7c723134e Add weather singleton (to store the whole data passed by weather notification).
Add weather info for TimeStylePebble.
Add further fields to the ParcelableWeather class.
Add reverse mapping to ParcelableWeather to get back the original OpenWeatherMap API condition codes.
2016-01-03 18:28:32 +01:00
Andreas Shimokawa e533fdbaa6 Pebble: actually display current whether in WeatherNeat 2015-12-29 22:10:38 +01:00
Andreas Shimokawa af9ee90383 actually get weather, seems to be the only way 2015-12-28 20:55:59 +01:00
danielegobbetti aa1014f51c Added dummy configuration file. This way we get data from the weather notification app.
Problem is we probably ned to add it as library, in order to unmarshal the intent. (That's why I commented the offending code in the receiver)
2015-12-28 17:46:16 +01:00
Andreas Shimokawa 7a1a6dbb2b WeatherNotification: Try to dissect the parcelable extra
This is useless, since we do not get the extra at all (only weather skins)

So... this is a dead end...
2015-12-28 11:33:22 +01:00
Andreas Shimokawa 483c435aa5 Commit old weather experiment - might be worth continuing 2015-12-27 19:44:33 +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 53fb63781e WIP: Work towards SMS replies / canned replies
- Implement the PebbleProtocol side (2.x and 3.x)
- Add Preferences for canned replies

This can be tested by enabling untested features in Pebble Settings
It lets you see and select the replies set up in "Canned Repies" on the Pebble
You will get a "NOT IMPLENTED" message on your Pebble.

THIS DOES NOT ACTUALLY DO ANYTHING USEFUL YET.
2015-12-13 12:03:57 +01:00
cpfeiffer 159c187e5e On Quit, remove all pending notifications
At least the notifications from #141 don't stay there forever, then.
2015-12-08 21:48:56 +01:00
Andreas Shimokawa 05a8436f7c Treat notifications from Signal as chat messages 2015-12-06 16:10:46 +01:00
Andreas Shimokawa 17ba49374c Fix copy&paste error in K9Receiver.java, update CHANGELOG.md 2015-11-27 23:45:27 +01:00
Andreas Shimokawa c768107db8 Catch permission errors in K-9 Mail receiver. Closes #175. 2015-11-27 22:42:47 +01:00
cpfeiffer bd0716ba58 Some more lint warnings fixed 2015-11-23 23:04:46 +01:00
cpfeiffer 95dc67c98d Back to sdk level 19 (#173) 2015-11-23 22:49:11 +01:00
cpfeiffer 81c2f657bd Some lint fixes 2015-11-23 22:46:12 +01:00
cpfeiffer 4616dcc965 Handle case where notification.extras is not available #174 2015-11-23 22:09:47 +01:00
cpfeiffer 394a0905dc Avoid potential, but very unlikely NPE 2015-11-23 21:59:13 +01:00
Andreas Shimokawa e3533a2b18 Pebble: Allow muting (blacklisting) Apps from within generic notifications on the watch
Closes #113
2015-09-25 00:53:40 +02:00
Andreas Shimokawa 94ad7f2eb9 set type to SMS when receiving an SMS via generic notification listener 2015-09-24 17:26:40 +02:00
Andreas Shimokawa 1d41f2f8e4 Refactoring
The notfification APIs now use NotificationSpec as their only parameter, which
contains all information (required and optional ones).
We no longer have separate methods and actions for SMS/EMAIL/GENERIC anymore.
The type of notification is important now, not how we received them technically.
2015-09-24 14:45:21 +02:00
Andreas Shimokawa 98b1abedac Allow phone call notifications (also in call display) to be disabled in preferences
This will allow Pebble Dialer to handle these #106
2015-09-20 22:04:53 +02:00