private List<String> ReadSDCard()
{
List<String> tFileList = new ArrayList<String>();
//It have to be matched with the directory in SDCard
File f = new File("/sdcard/pictures/");
File[] files=f.listFiles();
for(int i=0; i<files.length; i++)
{
File file = files[i];
String curFile=file.getPath();
String ext=curFile.substring(curFile.lastIndexOf(".")+1,
curFile.length()).toLowerCase();
if(ext.equals("jpg")||ext.equals("gif")||ext.equals("png"))
tFileList.add(file.getPath());
}
return tFileList;
}
Next >> HelloGallery, get and display the path of selected picture
Thank you for reading this article File type checking for HelloGallery With URL https://x-tutorials.blogspot.com/2009/09/file-type-checking-for-hellogallery.html. Also a time to read the other articles.
0 comments:
Write your comment for this article File type checking for HelloGallery above!