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
android android-fragments


source to share


No one has answered this question yet

Check out similar questions:

823
onActivityResult is not called on fragment
15
Capturing an image without intent, gives different output on different devices
3
How to send an image from one activity to another in Android?
1
Capturing an image with a camera and hiding advanced camera settings
1
fragment is not displayed after onActvitiyResult of removed camera
1
Why does the image rotate after the camera is captured by the camera?
0
ImageView does not insert camera image into fragment
0
ViewPager image gallery not showing inside Fragment - Android
0
startActivityForResult returns null data
0
Show captured image in ImageView with rear camera



All Articles
Loading...
X
Show
Funny
Dev
Pics