在android的应用程序中使用的图像和视频(sqlite的一滴?)应用程序、图像、视频、android

2023-09-07 00:36:37 作者:没了寂寞,谁陪我

我正在开发和使用的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 及的东西在数据库和操纵的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.