R1's
R1's

Reputation: 41

Get a list of apps which can play music

I want to get a list of apps which can play music. I tried this code but it return me an empty list :

Intent intent = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.withAppendedPath(MediaStore.Audio.Media.INTERNAL_CONTENT_URI,"1"); 
intent.setData(uri);
intent.setType("audio/*");
List<ResolveInfo> apps = getPackageManager().queryIntentActivities(intent, 0);
for (ResolveInfo rInfo : apps) {
    //process list here
}

Thanks for help !

Upvotes: 1

Views: 126

Answers (1)

Marcin Orlowski
Marcin Orlowski

Reputation: 75646

Get a list of apps which can play music

You cannot really. App does not expose it features music playing capabilities.

Upvotes: 2

Related Questions