I'm not sure I understand what the problem is here. MediaMetaDataRetriever
is the class to use to determine the metadata (including MIME type) of an arbitrary media file. Are you perhaps using it wrong?
MediaMetaDataRetriever retriever = new MediaMetaDataRetriever();
retriever.setDataSource("file:///sdcard/fileThatIsAACButDoesntHaveExtension");
String mimeType = retriever.extractMetadata(MediaMetaDataRetriever.METADATA_KEY_MIMETYPE);
How exactly are you trying to use this file? You shouldn't need its MIME type to use it (and you admittedly already know its MIME type - audio/mp4
)