How to save images from Camera in Android to specific folder?

前端 未结 3 584
长情又很酷
长情又很酷 2020-12-03 11:13

Basically, what I want to do is allow the user to make their own folder and then go to an activity that contains a button to launch th

3条回答
  •  时光说笑
    2020-12-03 12:00

    add this code before calling camera activity,

    Uri uriSavedImage=Uri.fromFile(new File("/sdcard/flashCropped.png"));
    camera.putExtra(MediaStore.EXTRA_OUTPUT, uriSavedImage);
    startActivityForResult(camera, 1);
    

提交回复
热议问题