I want to query all activitys that can play a music file.
I have tried to get all music players like this:
Intent resolve_intent = new Intent();
resolve_intent.setAction(android.content.Intent.ACTION_VIEW);
resolve_intent.setType("audio/*");
packages = getPackageManager().queryIntentActivities(resolve_intent, 0);
if (packages == null || packages.size() <= 0)
{
//none found
}
but i everytime get an empty (or null
) list...
if i do this for type = "image/*
or "video/*"
i get all applications that can handle this type.
only for "audio/*"
i get no players installed, even if i know that there is one...
so what am i doing wrong?