I have the name of a file img2455
, but i dont have the extension. It is possible to check the extension of that file?
It can be stored on assets folder as .jpg
, .png
or .bmp
, but i dont know, i must check it. ¿How can i do it?
Now i am accessing the file with a content provider forzing the extension as .jpg
, and it works when it is jpg, but it fails when the file haves bmp or png extension. This is my code:
theUri = Uri.parse("content://"+getPackageName()+"/"+file.getName()+".jpg");
thanks