How to write file into DCIM directory exactly where camera does?

后端 未结 5 511
暖寄归人
暖寄归人 2021-01-20 19:14

Suppose I am writing an alternative Camera application and wish to write images exactly into the same place as Camera does and name them exactly in the same name Camera does

5条回答
  •  野的像风
    2021-01-20 19:54

    Try using this code you can save the image bitmap to the directory using insert query

    String imgSaved = MediaStore.Images.Media.insertImage(
                    getContentResolver(), bitmap,
                    System.currentTimeMillis() + ".jpg", "DESCRIPTION HERE");
    

    For more details see the link

提交回复
热议问题