-3

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.

Lanka
  • 29
  • 2
  • 11
  • possible duplicate of [How can I pass a Bitmap object from one activity to another](http://stackoverflow.com/questions/2459524/how-can-i-pass-a-bitmap-object-from-one-activity-to-another) – Pedro Oliveira Oct 01 '14 at 11:22

2 Answers2

0

You can pass using intent.putExtra("data", bitmap), but this method is costly(memory consuming ).

Harsha
  • 659
  • 10
  • 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
  • 495
  • 11
  • 27