Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

How to play a specified spotify album through the mediasession framework

How to play a specified spotify album through the mediasession framework

Plan

Free

Country

 

Device

/

Operating System

AAOS  Android 12

 

My Question or Issue

Thank you very much for your support and look forward to your reply.
Environment: AAOS Android 12,Spotify version 4.4.1
Description:
I built a mediaApp on AAOS, plugged into Spotify through the MediaSession framework, When I want to by mediaControllerCompat. GetTransportControls () playFromSearch (String query, Bundle extras) to play its specified album, the content of the play is not my specified album
Question: I want to know if I'm using the wrong interface,the following is my interface call.
public void playFromSearchAlbum(String album, String artist, String genre) {
Bundle extras = new Bundle();
extras.putString(MediaStore.EXTRA_MEDIA_FOCUS, MediaStore.Audio.Albums.ENTRY_CONTENT_TYPE);
extras.putString(MediaStore.EXTRA_MEDIA_ALBUM, album);
extras.putString(MediaStore.EXTRA_MEDIA_ARTIST, artist);
extras.putString(MediaStore.EXTRA_MEDIA_GENRE, genre);
mMediaController.getTransportControls().playFromSearch(album, extras);
}

Reply
0 Replies

Suggested posts