Get WhatsApp Picture From memory

JavaFile


 String ExternalStorageDirectoryPath = Environment
                .getExternalStorageDirectory()
                .getAbsolutePath();

        String targetPath = ExternalStorageDirectoryPath + "/WhatsApp/Media/WhatsApp Images";
        File targetDirector = new File(targetPath);
        Getpath(targetDirector);
        Log.w("Path", pathlist.toString());
       
    }

private void Getpath(File targetDirector) {
// TODO Auto-generated method stub
File[] files = targetDirector.listFiles();
        for (File file : files){
        HashMap<String, String> map=new HashMap();
        map.put("ImagePath",file.getAbsolutePath());
        pathlist.add(map);
           imageAdapter.add(file.getAbsolutePath());
        }
}


Comments