Make Camera component create Pictures directory if not exists
@@ -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");
