2012-10-18 7 views

답변

1

미디어 파일의 경로와 함께 ACTION_VIEW 인 텐트를 만들고 재생할 미디어 유형을 포함하십시오.

String audioPath = "path/to/audio.mp3"; 

Intent intent = new Intent(); 
intent.setAction(android.content.Intent.ACTION_VIEW); 

// set the data and type, for movies this would be video/* 
intent.setDataAndType(Uri.parse(audioPath), "audio/*"); 
getContext().startActivity(intent); 

유형을 설정할 필요는 없지만 그렇게하는 것이 좋습니다. 유형을 설정하면 해당 유형을 처리하는 방법을 알고있는 활동으로 활동이 제한됩니다.

관련 문제