how to display images from a particular directory, android
<p>In my gallery I have 3 directories. sahoo is one of the directory. I have different images in all three directories. But I want to show images of sahoo directory only. My program shows all images which is present in gallery. But I want to get images from sahoo directory only. How to do that?
I am using android.</p>

<p>Thanks
Deepak</p>

<p>I have used the following code</p>

<pre><code>Uri uri = MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI;
Cursor mCursor = this.getContentResolver().query(uri, null, selection, null, null);
</code></pre>

<p>and in getview method i have written following lines of code</p>

<pre><code>mCursor.moveToPosition(position);
        Log.e(TAG,"the position is"+position);
        long id = mCursor.getLong(mCursor.getColumnIndexOrThrow(MediaStore.Images.Thumbnails.IMAGE_ID));
//      Log.e(TAG,"the value of id= "+id);
        //create the Uri for the Image 
        Uri uri = Uri.withAppendedPath(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, id+"");

        Intent intent = new Intent(Intent.ACTION_VIEW);

        intent.setData(uri); 

        startActivity(intent); 
</code></pre>
