1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-09 07:01:33 +02:00
Gadgetbridge/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents
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
..
AlarmReceiver.java Sunset/Sunrise: always use UTC timezone for calendar operations 2016-05-31 13:03:15 +02:00
BluetoothConnectReceiver.java make sure to only reconnect when device is in "waiting for reconnect state" 2016-05-29 21:44:43 +02:00
BluetoothStateChangeReceiver.java Remove now unused imports + fix one more SharedPreferences usage 2016-04-25 23:43:19 +02:00
K9Receiver.java Fixed things based on feedback 2016-05-19 23:58:13 +02:00
MusicPlaybackReceiver.java MusicPlayBackReceiver set track, artist and album to the artist member of MusicSpec. 2016-05-24 19:33:12 +02:00
NotificationListener.java Add handling for media session notifications 2016-06-08 20:41:43 +02:00
PebbleReceiver.java Remove now unused imports + fix one more SharedPreferences usage 2016-04-25 23:43:19 +02:00
PhoneCallReceiver.java Fixed things based on feedback 2016-05-19 23:58:13 +02:00
SMSReceiver.java Fixed things based on feedback 2016-05-19 23:58:13 +02:00
TimeChangeReceiver.java Remove now unused imports + fix one more SharedPreferences usage 2016-04-25 23:43:19 +02:00