0

I am trying to store and retrieve the image captured by device camera in SQLite Database as BLOB . I have no problem to do it, but when I retrieve images from DB I get an error, because of cursor, right?

W/CursorWindow: Window is full: requested allocation 707903 bytes, free space 680839 bytes, window size 2097152 bytes

After long time looking for solution I couldn't find it. I found only a lot of questions about the same issue without solid solution.

I can store URI of image , like it is discussed Android: Cursor Window is full. But then what happens if user deletes the image from Phone Memory/SD Card?

Also its not a good idea to ignore it, answered here https://stackoverflow.com/a/37035510/8258166.

So, what should I do?

Many thanks in advance!

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
ph7
  • 169
  • 8
  • "I am trying to store and retreave the image captured by device camera in SQLite Database as BLOB" -- I do not recommend this. "But then what happens if user deletes the image from Phone Memory/SD Card?" -- store the image on [internal storage](https://commonsware.com/blog/2014/04/07/storage-situation-internal-storage.html), where the user does not have direct access to the image. – CommonsWare Sep 30 '17 at 16:47
  • Cool! 3 day headache is gone! Chears @CommonsWare – ph7 Sep 30 '17 at 17:04

0 Answers0