Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android check file extension

//if you have the path
String someFilepath = "image.fromyesterday.test.jpg"; 
String extension = someFilepath.substring(someFilepath.lastIndexOf("."));

//direct with file
String extension = ff.getAbsolutePath().substring(ff.getAbsolutePath().lastIndexOf("."));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #android #check #file #extension
ADD COMMENT
Topic
Name
2+8 =