Android: Implement MediaSession API
Reason for the change
Implement MediaSession API to support external media controls on Android.
This implementation should work with all Android SDKs supported by Qt 6.5, which Elisa is currently targeting. Perhaps we should increase the minimum Android SDK version. KDE Craft sets the minimum version to 21, while the minimum supported by Qt 6.5 is version 26. https://doc.qt.io/qt-6.5/android.html
While the bulk of the implementation is done, audio focus manager is not present in this implementation. I'll send it in a separate MR.
Depends on !680 (merged)
Test plan
- Start playing anything on Elisa.
- Use the playback notification controls or the internal controls.
- The playback notification and the player should be in sync.
Screenshots or screen recordings
Naturally, the appearance of the notification will depend on the vendor's implementation.
| Android 16 (Material You) | Android 11 (One UI 3.1) |
|---|---|
![]() |
![]() |

