简体   繁体   English

如何安全地将图像和视频存储在android中,以便其他应用程序不能使用?

[英]how to securely store a image and video in android so other application can not use?

I have lots of images and video, so I cannot store in internal storage. 我有很多图像和视频,因此无法存储在内部存储器中。 I want to store it in external storage and I don't want to show this images and video to user. 我想将其存储在外部存储中,也不想向用户显示这些图像和视频。 It can not be copy when it connected to USB. 连接到USB时无法复制。
I already tried to encrypt a video and images, but it takes to much time to decrypt a video and it is not played directly. 我已经尝试过对视频和图像进行加密,但是解密视频需要花费大量时间,并且不能直接播放。 This solution is told by so many people on stack overflow but it is not feasible for me. 很多人都在堆栈溢出中告诉这个解决方案,但是对我来说这是不可行的。
I tried this solution, so please give me the another solution if it is possible. 我尝试了解决方案,所以请尽可能给我另一个解决方案。

Thanks in advance. 提前致谢。

Include an empty file named .nomedia in your external files directory (note the dot prefix in the filename). 在外部文件目录中包含一个名为.nomedia的空文件(请注意文件名中的点前缀)。 This will prevent Android's media scanner from reading your media files and including them in apps like Gallery or Music. 这将阻止Android的媒体扫描器读取您的媒体文件,并将它们包括在诸如Gallery或Music之类的应用程序中。 for example , you store your images and video in sdcard/yourappname/ then put .nomedia file in sdcard/yourappname/.nomedia And then other application can not read your media files 例如,您将图像和视频存储在sdcard / yourappname /中,然后将.nomedia文件放入sdcard / yourappname / .nomedia中,然后其他应用程序无法读取您的媒体文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM