title: Android How can I using Cursor get image and video thumbnails in my direct path both?
body: <p>How can I using Cursor get image and video thumbnails in my direct path in same cursor?</p>
  
  <p>I need get the image and video thumbnails in /DCIM/100ANDRO folder.</p>
  
  <p>But I just can separate  to get image and video in at sd card all data.</p>
  
  <pre><code>  private ArrayList&lt;ImageItem&gt; getData() {
            final ArrayList&lt;ImageItem&gt; imageItems = new ArrayList&lt;&gt;();
  
            ContentResolver cr = mContext.getContentResolver();
  
     String[] projection = {MediaStore.Images.Thumbnails.DATA, MediaStore.Video.Thumbnails.DATA};
            Cursor cursor = cr.query(MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI,projection,null,null,null);
  
            for( int i = 0 ; i &lt; cursor.getCount(); i++)
            {
                cursor.moveToPosition(i);
                String filePath = cursor.getString(cursor.getColumnIndex(MediaStore.Images.Thumbnails.DATA));
                Log.i("info","filePath:"+filePath);
                File file = new File(filePath);
  
                Bitmap myBitmap =       BitmapFactory.decodeFile(file.getAbsolutePath());
  
                imageItems.add( new ImageItem(myBitmap, "Image#" + i) );
            }
  
  
            cursor =       cr.query(MediaStore.Video.Thumbnails.EXTERNAL_CONTENT_URI,projection,null,null,null);
            for( int i = 0 ; i &lt; cursor.getCount(); i++)
            {
                cursor.moveToPosition(i);
                String filePath = cursor.getString(cursor.getColumnIndex(MediaStore.Video.Thumbnails.DATA));
                Log.i("info","filePath:"+filePath);
                File file = new File(filePath);
  
                Bitmap myBitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
  
                imageItems.add( new ImageItem(myBitmap, "Image#" + i) );
            }
  
            cursor.close();
    return imageItems;
        }
  </code></pre>
  
  <p>Have possible using cursor direct folder to get the thumbnails and get video and image thumbnails both?</p>
  
  <p>thank you very much.</p>