I want to save and display the captured image in the next activity.I have written the code but its not working what modifications I need to do in that code.
camera.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Log.d("Coming in the camera intent","coming in yhe camera intent");
String filePath = Environment.getExternalStorageDirectory()+ "/s1.jpeg";
File file = new File(filePath);
Uri output = Uri.fromFile(file);
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, CAMERA_REQUEST);
}
});
}
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == CAMERA_REQUEST && resultCode == RESULT_OK) {
Log.d("Coming in the if loop","coming in the if loop");
Bitmap photo = (Bitmap) data.getExtras().get("data");
Intent i1=new Intent(MyMenu.this,FullScreen.class);
i1.putExtra("photooo",photo);
startActivity(i1);
}
}
and Receiving activity where I want to save and display the image
image=(ImageView)findViewById(R.id.image);
note=(ImageButton)findViewById(R.id.note);
tick=(ImageButton)findViewById(R.id.tick);
cross=(ImageButton)findViewById(R.id.cross);
Intent intent = getIntent();
Bitmap photo = (Bitmap) intent.getParcelableExtra("photooo");
image.setImageBitmap(photo);
}
stack
10-25 12:50:30.459: E/AndroidRuntime(27740): java.lang.RuntimeException: Unable to resume activity {com.example.babysnap/com.example.babysnap.MyMenu}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1888, result=-1, data=Intent { act=inline-data (has extras) }} to activity {com.example.babysnap/com.example.babysnap.MyMenu}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.babysnap/com.example.babysnap.FullScreen}; have you declared this activity in your AndroidManifest.xml?