BromptonWeb
Lurker
if(items[item] == "Open MP3"){
try {
//launch intent
Intent i = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.fromFile(new File(filepath));
String url = uri.toString();
//grab mime
String newMimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(
MimeTypeMap.getFileExtensionFromUrl(url));
i.setDataAndType(uri, newMimeType);
startActivity(i);
} catch (Exception e) {
toastmake("Error Loading MP3");
e.printStackTrace();
}
Can someone help me fix this so all phone can play the mp3 file.
Some phone when they click the mp3 they are ask with what media to open it
some other saying Error Loading MP3
Can can see entire file in attachement
Thank's
try {
//launch intent
Intent i = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.fromFile(new File(filepath));
String url = uri.toString();
//grab mime
String newMimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(
MimeTypeMap.getFileExtensionFromUrl(url));
i.setDataAndType(uri, newMimeType);
startActivity(i);
} catch (Exception e) {
toastmake("Error Loading MP3");
e.printStackTrace();
}
Can someone help me fix this so all phone can play the mp3 file.
Some phone when they click the mp3 they are ask with what media to open it
some other saying Error Loading MP3
Can can see entire file in attachement
Thank's