That's an example for passing data between Activities, the only purpose is you understand how it works, the task self is rough, I have just passed Photo Path in my Programm, NOT the Bitmap but it worked in any case.
It's very important to see what Interface is implemented by the Class of the objet to be passed, in this case, Bitmap implements Parcelable.
On the MainActivity:
Using java Syntax Highlighting
Intent intent = new Intent(CameraPreview.this, EditPhoto.class);
Bundle bundle = new Bundle();
bundle.putParcelable("picture", myPic);
intent.putExtras(bundle);
startSubActivity(intent, SUB_ACTIVITY_REQUEST_CODE);
Parsed in 0.031 seconds, using
GeSHi 1.0.8.4
On the Subactivity:
Using java Syntax Highlighting
Bundle bundle = this.getIntent().getExtras();
Bitmap myPic=null;
if ( bundle != null ) {
myPic = (Bitmap)bundle.getParcelable("picture");
}
Parsed in 0.032 seconds, using
GeSHi 1.0.8.4
I hope you have understand all.
C u
