title: android - cursor limit photos
body: <p>How do I limit the photos till top 50? Also jho do I get most recent records here?</p>
  
  <pre><code>final String[] projection = { MediaStore.Images.Media.DATA };
         final String selection = MediaStore.Images.Media.BUCKET_ID + " = ?";
         final String[] selectionArgs = { CAMERA_IMAGE_BUCKET_ID };
         final Cursor cursor = context.getContentResolver().query(Images.Media.EXTERNAL_CONTENT_URI, 
                 projection, 
                 selection, 
                 selectionArgs, 
                 null);
         List&lt;Image&gt; result = new ArrayList&lt;Image&gt;(cursor.getCount());
         if (cursor.moveToFirst()) {
             final int dataColumn = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
             do {
                 final String data = cursor.getString(dataColumn);
                 result.add(new Image(data));
             } while (cursor.moveToNext());
         }
         cursor.close();
  </code></pre>
  
  <p>Thank you in advance</p>