I tried and worked as shown below with intent.putExtra("name", bitmap)
When passing with the intention
Intent intent = new Intent(Current.this, Next.class); intent.putExtra("bmp", bitmap); startActivity(intent);
When retrieving,
Bitmap bitmap = getIntent().getParcelableExtra("bmp");
OR
Another option is to use the Application class,
You can also use a class that extends Application
, and it has a setter receiver for Bitmap and calls it from any Acitivity.
((myApplication_class_name)getApplication()).setBitmap(bmp);
and select a bitmap using
((myApplication_class_name)getApplication()).getBitmap();
source share