Capture image from camera and show fragment, restart FragmnetActivity onActivityResult

I want to capture camera image and show it in imageView in fragment, i did this work, it works fine on Motorola droid maxx XT-1080m kitkat 4.4.4 but restarting faragmentActivity on galaxy s4 lollipop 5.0 is my code

Camera purpose

Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, CAMERA_REQUEST);

      

onResultActivity ()

if (resultCode == Activity.RESULT_OK) {
    Bitmap photo = (Bitmap) data.getExtras().get("data");
    iv_parse_user_profile_picture.setImageBitmap(photo);
}

      

+3


source to share





All Articles