SquareCamera icon indicating copy to clipboard operation
SquareCamera copied to clipboard

Question about integration.

Open helloerikaaa opened this issue 9 years ago • 1 comments

Hi, I want to open another fragment after taking the picture. I've tried many, many ways and I can't do it yet. Can you help me with it? Also, if I try to do anything on the onActivityResult switch-case, I can't because it never gets to enter to the switch code.

Thanks!

helloerikaaa avatar Aug 17 '15 19:08 helloerikaaa

You need to launch your fragment in the onPictureTaken method in the CameraFragment class:

@Override
public void onPictureTaken(byte[] data, Camera camera) 
{
    int rotation = getPhotoRotation();
    //Log.d(TAG, "normal orientation: " + orientation);
    //Log.d(TAG, "Rotate Picture by: " + rotation);
    getFragmentManager()
            .beginTransaction()
            .replace(
                    R.id.fragment_container,
                    EditSavePhotoFragment.newInstance(data, rotation, mImageParameters.createCopy()),
                    EditSavePhotoFragment.TAG)
            .addToBackStack(null)
            .commit();
    }

in this case EditSavePhotoFragment will start after the picture is taken

GiacomoDB avatar Sep 28 '15 14:09 GiacomoDB