[英]How to save Image from ImageView to Android Shared Storage? I dont want my images to delete when user uninstall the app
I want to store my file in android Shared Storage.我想将我的文件存储在 android 共享存储中。 All the ways I have found store image in internal storage which I don't want because internal storage will be deleted when user uninstall the app.我在内部存储中找到存储图像的所有方法都是我不想要的,因为当用户卸载应用程序时内部存储将被删除。 A code would be helpful which store the image from ImageView to shared storage.将图像从 ImageView 存储到共享存储的代码会很有帮助。 I have tried reading android documentation but I don't understand what's written there.我试过阅读 android 文档,但我不明白那里写了什么。
Looking at the table below you should use the MediaStore API for the job.查看下表,您应该使用 MediaStore API 来完成这项工作。 Source: Android data storage overview来源: Android 数据存储概述
Then here's a thorough example how you can write image to file using the MediaStore API.然后这是一个完整的示例,您如何使用 MediaStore API 将图像写入文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.