Save image to specific directory in gallery android

十年热恋 提交于 2021-02-11 12:40:08

问题


I want to save image to a specific director in the gallery. The below code works fine but the image is storing into "Pictures" folder

val bitmap: Bitmap = (iv_full_image.getDrawable() as BitmapDrawable).getBitmap() MediaStore.Images.Media.insertImage(getContentResolver(),bitmap, "photo" , "myImg")

how do I store the image to a folder called "MyImages" in gallery.

and is there any other way to store image to the gallery because it's saying insertImage(ContentResolver!, Bitmap!, String!, String!): String!' is deprecated. Deprecated in Java... but it totally works for me.

来源:https://stackoverflow.com/questions/63429815/save-image-to-specific-directory-in-gallery-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!