-1
我想獲取可播放音樂的應用程序列表。 我想這個代碼,但它返回我一個空列表:獲取可播放音樂的應用程序列表
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
}
感謝您的幫助!
好吧,但有可能得到使用MediaPlayer的應用程序列表? –
否。MediaPlayer不是播放媒體的唯一方式 –