Hi I need a little help with understanding how to send image uri via intent.putExtra() so I can change the source of another activity with intent.getExtra().
So basically I’m trying to send from Activity1 intent.putExtra("R.drawable.image"); to Activity2 and show the image.
I’m trying to do it like this :
Activity1:
intent.putExtra("image_url","R.drawable.image");
Activity2:
ImageView image = (ImageView) findViewById(R.id.image);
String image_link = getIntent().getStringExtra("image_url");
and I don’t know how to set it as background to image.
Any suggestions?
Activity1:
Activity2:
Now you have the resource id as an int and you can use it: