hi
Dont say this is a duplicate question because i have read them all for two days.
And non of them really supply a useful answer.
I have a number of different files in a folder on the sdcard. Want to open right app depending on apk, txt, mp3, avi, jpg or show a chooser dialog. Therefor i need the mime type on the fly.
I have tried :
manageQuery return null cursor to often.
MimeTypeMap cannot resolve the .3gp file and think its a .txt
URLConnection.guessContentTypeFromName Dont work at all
Was thinking i have to use the MediaFile.java and build my own..file.equals(".mp3")
addFileType("MP3", FILE_TYPE_MP3, "audio/mpeg");
addFileType("M4A", FILE_TYPE_M4A, "audio/mp4");
addFileType("WAV", FILE_TYPE_WAV, "audio/x-wav");
addFileType("AMR", FILE_TYPE_AMR, "audio/amr");
Is that the way to do it?