I'm very new for android. In my application I want to share bitmap image one activity to another activity. How can I do that.
Asked
Active
Viewed 91 times
2 Answers
0
You can pass using intent.putExtra("data", bitmap), but this method is costly(memory consuming ).
Harsha
- 666
- 8
- 23
-1
Pass the following in your First activity
Intent intent = new Intent(this, AnotherActivity.class);
intent.putExtra("Bitmap", bitmap);
and retrive in your AnotherActivity
Intent intent = getIntent();
Bitmap bitmap = (Bitmap) intent.getParcelableExtra("Bitmap");
Shashi Shiva L
- 431
- 10
- 24
-
If the answer is the same as the reported duplicate please don't post it. – Pedro Oliveira Oct 01 '14 at 11:33