For example, I wanted to get the file Extension from the file URL using the function below:
File name:
Greatest Hits - Lenny Kravitz (Booklet 01) [2000].jpg
Url of the file:
String url = "/mnt/sdcard/mydev/Greatest Hits - Lenny Kravitz (Booklet 01) [2000].jpg";
Function call:
String extension = MimeTypeMap.getFileExtensionFromUrl(url);
But I'm getting an exception on the function call. Is this a bug or a feature?
It works fine for file names that don't contain that many foreign characters (such as paranthesis).
Is the function buggy? Am I missing something? How am I supposed to differentiate a bug from a feature? I've read the function description and it should work properly.
Do you personally use it in your projects? It doesn't seem reliable.