Unverified Commit 03a021a5 authored by singhalsara8's avatar singhalsara8 Committed by GitHub

Make Camera component create Pictures directory if not exists (#2141)

parent e1c94a3d
......@@ -141,6 +141,11 @@ public class Camera extends AndroidNonvisibleComponent
if (Environment.MEDIA_MOUNTED.equals(state)) {
Log.i("CameraComponent", "External storage is available and writable");
File directory = new File(Environment.getExternalStorageDirectory()+"/Pictures");
if (!directory.exists()) {
directory.mkdir();
}
File image = new File(Environment.getExternalStorageDirectory(),
"/Pictures/app_inventor_" + new Date().getTime()
+ ".jpg");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment