• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Error with some phones loading the mp3

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
 

Attachments

Back
Top Bottom