You can convert to bytearray and pass the same. Decode and display the same in next activity.
Pass image using intent
Intent i = new Intent(this, NextActivity.class);
Bitmap b; // your bitmap
ByteArrayOutputStream bs = new ByteArrayOutputStream();
b.compress(Bitmap.CompressFormat.PNG, 50, bs);
i.putExtra("byteArray", bs.toByteArray());
startActivity(i);
To receive
if(getIntent().hasExtra("byteArray")) {
ImageView previewThumbnail = new ImageView(this);
Bitmap b = BitmapFactory.decodeByteArray(
getIntent().getByteArrayExtra("byteArray"),0,getIntent().getByteArrayExtra("byteArray").length);
previewThumbnail.setImageBitmap(b);
}
If you are passing string url
How do you pass a string from one activity to another?
Edit:
To pass uri
Uri uri = Uri.parse("android.resource://com.example.passurl/drawable/ic_launcher");
// com.example.passurl is the package name
// ic_launcher is the image name
Intent i = new Intent(MainActivity.this,NewActivity.class);
i.setData(uri);
startActivity(i);
To receive
ImageView iv= (ImageView) findViewById(R.id.imageView1); // initialize image view
if(getIntent().getData()!=null)
{
Uri path = getIntent().getData();
iv.setImageURI(path); //set the image
}