title: Android: get stored video from database
body: <p>I've prepared sqlite database in SQLite Manager with all data added manually. This db stored images (BLOB), text and video (BLOB) files. I cannot store only URL/SD card link to videos but whole file in database.
  I easily can get text and images from database and show in my application.  </p>
  
  <p>For images code below:  </p>
  
  <pre><code>Cursor cursor = myDbHelper.getData(); // select from database text, images(BLOB) and videos(BLOB).  
  
  ...
  ByteArrayInputStream inputStream = new ByteArrayInputStream(cursor.getBlob(1));  //image
  Bitmap b = BitmapFactory.decodeStream(inputStream);  
  ImageView iv = new ImageView(this);  
  iv.setImageBitmap(b);  
  </code></pre>
  
  <p>And it is working.
  But I don't know how to get video from BLOB and display/play in VideoView field using:  </p>
  
  <pre><code>ByteArrayInputStream inputStream = new ByteArrayInputStream(cursor.getBlob(2));  //video
  </code></pre>
  
  <p>How to put inputStream to VideoView or other format to display in application.
  Please help.</p>
  
  <p><strong>EDIT:</strong> I stored whole database (with text,images and videos) on device. 
  I connect with external database (MySQL) only for update. And after updating records i.e. with movies, device doesn't use Internet connection any more.</p>