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

Tony Tetley

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.

Yes, that is what I mean. I like the idea of showing them the amount of free memory and letting them decide. Thanks for the reply.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…