Open ghost opened 2 years ago
@itsmecom you want to implement the MediaSession.Delegate
to add media support.
You can see some examples of how we implemented this feature in our applications with an abstraction in our Android Components here: https://github.com/mozilla-mobile/firefox-android/tree/main/android-components/components/feature/media. If you decide to take this route as well, we have a reference browser implementation that shows you what does integration look like in an application.
The android media component mentioned above is the only example I can think of right now that implements the MediaSession.Delegate
. You can still read the kotlin code and write it in Java where needed.
How can I setup music player control widget in notification bar on Geckoview Android.
It is possible on chrome browser through Media Session Api
Below is the image from chrome browser android.
How can I achieve similar music control widget on Geckoview