Joao Batista
Joao Batista

Reputation: 11

Using Images and videos in android application(Sqlite blob?)

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..)

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

Can you please help me?

Thanks!

Upvotes: 1

Views: 2765

Answers (1)

Heiko Rupp
Heiko Rupp

Reputation: 30944

I know that this does not exactly answer your question:

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.

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

Upvotes: 1

Related Questions