오디오 플레이어를 돌릴 수있는 palyers 용 데일로그를 열려고합니다.선택자가 여러 유형의 인 텐트를 표시하도록 설정하는 방법은 무엇입니까?
내가 한 내 자신의 플레이어가 재생 쓴이
final Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(finalPath), "audio/*");
List<ResolveInfo> intents = context.getPackageManager().queryIntentActivities(intent, 0);
if (intents != null && intents.size() > 0) {
context.startActivity(Intent.createChooser(intent, "Choose Player"));
}
을하고있는 중이 야. 또한 사용자가 내 애플리케이션을 사용할 때만 선택기 대화 상자에 내 플레이어를 표시하려고합니다. 나는 때 사용자 그래서 내가 한 의도 츄 MIMI 유형을 모두 보여줄 수있는 방법
<activity
android:name=".player.MyAudioPlayer"
android:label="My Player"
android:screenOrientation="sensor"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:mimeType="audiomy/*"/>
</intent-filter>
</activity>
처럼 내 palyer 활동을 intent.setDataAndType(Uri.parse(finalPath), "audio/*");
을 시도 응용 프로그램의 외부에서 플레이 오디오 싶지 않아 말인가요? 내가
intent.setype("audiomy/*");
을 수행 할 때 내가 다른 플레이어를 건너 뛰고으로 때와 그 반대의 경우도 마찬가지
문제의 해결책을 찾으셨습니까? 현재 프로젝트에서 같은 문제에 직면하고 있습니다. – junkdog
아니요 해결책을 찾지 못했습니다 – Arslan