Java tutorial
//package com.java2s; import java.io.File; import android.content.Intent; import android.net.Uri; public class Main { private static Intent getAudioFileIntent(File file) { Intent intent = new Intent("android.intent.action.VIEW"); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.putExtra("oneshot", 0); intent.putExtra("configchange", 0); Uri uri = Uri.fromFile(file); intent.setDataAndType(uri, "audio/*"); return intent; } }