title: Retrieving BLOB from SQLite database android
body: <p>I have a database with some images inside, saved as BLOB.
  I didn't have any problem with the database until now, I try to retrieve the BLOB as I would do with any other data but it's not working:</p>
  
  <pre><code>Cursor c = mDb.query(" ... ");
  c.moveToFirst();
  
  ByteArrayInputStream inputStream = new ByteArrayInputStream(c.getBlob(0));
  Bitmap b = BitmapFactory.decodeStream(inputStream);
  </code></pre>
  
  <p>The problem is that I get an exception when the program is trying to get the information of "c.getBlob(0)". It's also not working for "byte[] b = c.getBlob(0)".</p>
  
  <p>Possible reasons:</p>
  
  <ul>
  <li>The file is too large? (1.2Mb)</li>
  <li>I have to do something else to configure the kind of BLOB that it is?</li>
  </ul>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p>SOLVED: when I tried accidentally with other file it worked! Then I realized that the file was smaller (less than 1Mb), so the problem seems to be the size.</p>
  
  <p>Now my question is, can I configure it to make the BLOB support large files?</p>
  
  <p>Thanks!</p>