2

Possible Duplicate:
Get Bitmap from an Uri [android]

How to set bitmap to intent?

I have bitmap as input and I need to call Intent.setData().
Intent.setData() expects Uri, How to convert bitmap to Uri?

Thanks in advance.

Community
  • 1
  • 1
pavan
  • 1,085
  • 4
  • 22
  • 34

1 Answers1

0

hey just simply you can pass bitmap using putExtra()

see in following example

Bitmap photo = extras.getParcelable("data");
Intent it = new Intent(getApplicationContext(), TestActivity.class);
it.putExtra("bitmap",bp);
startActivity(it);

and for getting bitmap from intent use following

Bitmap bp = (Bitmap) getIntent().getExtras().get("bitmap");

Enjoy..!

Nirav Dangi
  • 3,607
  • 4
  • 49
  • 60