Android Question Storing pictures on device, link it SQLite?

Tony Tetley

Member
Licensed User
Longtime User
A two part question:

1. If I use the device camera to take a picture, can I store it on the device and have a link to it in an SQLite DB?

2. Given the memory requirement of pictures, is this a bad idea?

Thanks,
Tony
 

Roycefer

Well-Known Member
Licensed User
Longtime User
Do you mean store the picture's file address as text in an SQLite database? That shouldn't be a problem.

As for the memory, it depends on how many pictures are being stored. Modern devices have tons of storage space and modern users tend to store tons of pictures and video on their devices so it wouldn't be out of character for those. Older devices will have less storage space and their users might not take kindly to what little space they have being unnecessarily hogged by a single app. I would check for how much storage space they have and store pictures accordingly.

This link: http://stackoverflow.com/questions/8133417/android-get-free-size-of-internal-external-memory has some Java code that you can use with in-line Java and JavaObject that will give you that info.
 
Upvote 0
Top