coomar2841 / image-chooser-library

An Easy Image/Video Chooser Library for your Android Apps
646 stars 192 forks source link

Save image in app folder #33

Open dunglv299 opened 10 years ago

dunglv299 commented 10 years ago

Hello, your library is very nice. There is a issue when I would like to save image to app folder. I change method getDirectory in FileUtils like this public static String getDirectory(Context context, String foldername) { File storageDir = null; if (Environment.MEDIA_MOUNTED.equals(Environment .getExternalStorageState())) { storageDir = context .getExternalFilesDir(Environment.DIRECTORY_PICTURES); if (storageDir != null) { if (!storageDir.mkdirs()) { if (!storageDir.exists()) { Log.e("Pictures", "failed to create directory"); return null; } } } } else { Log.v(context.getString(R.string.app_name), "External storage is not mounted READ/WRITE."); } return storageDir.getAbsolutePath(); } It is not working. Can you help me ?

coomar2841 commented 10 years ago

So, you just want to store all the images in the DIRECTORY_PICTURES folder?

dunglv299 commented 9 years ago

Yes, How can I save image to DIRECTORY_PICTURES?