I am writing an android app, and I want to access the playlist created by android default music app.
In my app, the user should be able to browse the playlist and select any playlist to play.
So basically I want to know how to access it and when user selects any playlist, how to pass it to default music app to play it in background.
Is it something to do with ContentProvider or mediastore?? I really don't know how to access data on other apps.
Thank you so much!
This activity combines Ankur Pandya's two answers to list the playlists on the device and then play the first track from the first playlist.
To display all the playlist created by user in default music application in Android, I am using following block of code in my Activity:
Don't forget to include these before using
This code is Tested and working fine over target = android-8
To play the songs from above playlists, I m calling the function
from the above onCreate method. And remaining code is as per mentioned below.
Hope this will work. :)