Passing Bitmap To Another Activity

This example explains how you can pass a bitmap from one activity to another.

Algorithm:

1.) Create a new project by File-> New -> Android Project name it PassBitmapToActivity.

2.) Create and write following into AndroidReceivedBitmap.java:

 

 

 

3.) Create and write following into newimage.xml:

 

 

 

4.) Add following activity into your manifest file:

 

 

 

5.) Run for output.

Steps:

1.) Create a project named PassBitmapToActivity and set the information as stated in the image.

Build Target: Android 4.4
Application Name: PassBitmapToActivity
Package Name: com.example.PassBitmapToActivity
Activity Name: PassBitmapToActivityActivity

passbitmap1

2.) Open PassBitmapToActivityActivity.java file and write following code there:

 

 

 

3.) Compile and build the project.

Output

passbitmap2

passbitmap3