Storing images in SQLite database on mobile device (app has stopped)

Storing images in SQLite database on mobile device (app has stopped)

  

I have an app that temporarily stores photos from the mobile device camera in the SQLite database, before syncing them to AWS using the Amazon S3 forge component.  Everything works well, but I recently had a user on Android receive the "Unfortunately, app has stopped" error while trying to perform the sync.  I'm giving them an option to also store in the photo library on the local device (so he hasn't lost all his images), but I'm concerned about the viability of doing this long term.

1) Is it a good option to store in the database, even temporarily?

2) Is there a practical limit to storage space that the SQLite should have?

He had about 110 images in the database.  I do a resize so it's taking up about 100M in the database.  He has plenty (about 15G) available still on his device.  It's an LG Phone that was purchased about a year ago.

I'm blaming his error on the database, and I'm sure clearing the app data would solve the problem, but I'm not sure if there's something I can do to hotfix it so he doesn't lose the image records.

Solution

So, for anybody else who may have this issues, it's not a problem having that many images in the database.  The problem lies in QUERYING the documents.  I had an aggregate that grabbed all of them before sending.  I changed it to limit to one record, send that, then perform the query again to grab the next record.  Everything now works like a charm and it's also more scalable.

Solution