存储视频,图像和音频文件不能被其他人访问 [英] Storing videos, images and audio files that can not be accesses by others

查看:88
本文介绍了存储视频,图像和音频文件不能被其他人访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发例如WhatsApp聊天应用。在此应用程序用户可以发送视频,图像和音频文件给其他用户。现在的问题是 - 我的客户希望这些媒体内容的私人保持我的应用程序。它不能被画廊和用户读取甚至无法直接看到他们的SD卡。这些媒体文件,只要在我们的应用程序可见。

I am developing a chat application like whatsapp. In this app user can send videos, images and audio files to other users. Now the problem is - my client wants to keep all these media content private to my application. It can not be read by gallery and user can not even see them from sdcard directly. Those media files should be visible in our application only.

第一个解决方案是将所有的文件存储在内部存储设备。但是,这是不可取的,因为视频和图像将填补内部存储和用户将无法下载更多的应用程序没有内部存储器。

The first solution is to store all files in internal storage. But this is not advisable as videos and images will fill up the internal storage and user wont be able to download more apps without internal memory.

任何人都可以给我建议,我可以用它让我的私人数据的任何其他的方法呢?

Can anyone suggest me any other approach which I can use to make my data private?

推荐答案

有关这一点,你必须存储在外部存储设备上的数据与创建开始与。(点)那么这个文件夹是从FileExplorer.In隐藏这个文件夹,你需要创建一个 .nomedia 文件,并将您的图像和视频,然后图像和视频都不能可见用户在Gallery.nomedia夹的文件不能由库被读出。

For this you have to store your data in External Storage with creating a folder name starting with the .(dot) then this folder is hidden from the FileExplorer.In this folder you need to create a .nomedia file and place your Images and video then images and videos are can not be visible to User in the Gallery.nomedia folder files can not be read by the gallery.

这篇关于存储视频,图像和音频文件不能被其他人访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆