Choose music within Google Music on Android.

Asked 2 years ago, Updated 2 years ago, 95 views

In the Android application that I created around Android 2.1,

Intent=newIntent();
int.setAction(Intent.ACTION_PICK);
int.setType(MediaStore.Audio.Media.CONTENT_TYPE);
int.setData(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);

I implemented an application that allows you to select music when you write startActivityForResult to retrieve content provider ID data, etc.

When I ran it on Android 5.0, there were only a few MP4 files, but I couldn't select music information as before.

Perhaps the reason is that the music application has moved to Google Music, but how can Google Music get information about the selection and database in the same way as before?

Please let me know.

android android-intent

2022-09-30 15:45

1 Answers

int.setAction(Intent.ACTION_GET_CONTENT);
int.setType("audio/*");


2022-09-30 15:45

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.