在android的应用程序中使用的图像和视频(sqlite的一滴?) [英] Using Images and videos in android application(Sqlite blob?)

查看:90
本文介绍了在android的应用程序中使用的图像和视频(sqlite的一滴?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发和使用的SQLite数据库的应用程序,和我有麻烦来存储图像数据库中,我读了很多的例子,但不是在这里工作,可有人告诉我存储图像的最佳方式在SQLite的? (然后我需要存储电影以及..)

I'm developing and an application that uses a sqlite database, and I'm having trouble to store images in database, I read a lot of examples, but not working here, can someone tell me the best way to store images in SQLite? (and then I'll need to store movies as well..)

在今后我会制定一个后台,使公司得以在db添加/修改/删除项目。

In the future I'll have to develop a backoffice so the company can add/change/delete items in the db.

你能帮帮我吗?

谢谢!

推荐答案

我知道这并不完全回答你的问题:

I know that this does not exactly answer your question:

我不打扰存储这些庞大的斑点SQLite中,而是将它们存储在文件系统,并且只存储在sqlite的文件名/路径。 这将节省您将文件放入(创建,删除,列表)是比较容易通过的java.io.File 及的东西在数据库和操纵<$的麻烦C $ C>的FileInputStream 等。

I'd not bother storing those huge blobs in sqlite, but rather store them on file system and only store the file names/paths in sqlite. This will save you from the hassle of putting the stuff in the DB and manipulation of files (create, delete, list) is relatively easy through java.io.File and FileInputStream etc.

请参阅例如 PicHelper 作为一个类,在/存储/加载数据文件的交易。

See e.g. PicHelper as a class that deals with storing / loading data in/from files.

这篇关于在android的应用程序中使用的图像和视频(sqlite的一滴?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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