How to retrieve the last image that saved from an SDcard in Android
<p>i am using a camera application in android. In my application the image that clicked is saved to SD Card as shown bellow.</p>

<pre><code>Camera.PictureCallback jpegCallback = new PictureCallback() {
        public void onPictureTaken(byte[] data, Camera camera) {
            FileOutputStream outStream = null;
            try 
            {               
                outStream = new FileOutputStream(String.format("/sdcard/%d.jpg", System.currentTimeMillis()));  
                outStream.write(data);
                outStream.close();              
                sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://"+ Environment.getExternalStorageDirectory())));
                Log.d(TAG, "on pictureTaken" + data.length);
            } 
            catch (FileNotFoundException e) 
            {
                e.printStackTrace();
            } 
            catch (IOException e)
            {
                e.printStackTrace();
            } 
            finally
            {}
            Log.d(TAG, "on pictureTaken-jpeg");
            try
            {
                Thread.sleep(2000);
            } 
            catch (InterruptedException e) 
            {               
                e.printStackTrace();
            }   
            startActivity(new Intent(FbCamera.this,view.class));
        }
    };
</code></pre>

<p>I want to retreive this image to imageview in another activity. My second activity is, as shown bellow.</p>

<pre><code>public class view extends Activity
{
    private ImageView imgView;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main2);
        imgView = (ImageView)findViewById(R.id.photoResultView);    
        //imgView.setImageResource("");
    }
}
</code></pre>

<p>I want to display the last image that saved from SDCard to imageview. If anyone knows about it, please help me...</p>
