5


Thanks in advance for the help. Here is the issue that i am facing while creating my first app.

I am making app in which user have an option to take image from gallery or camera, when importing image from gallery the app is working as desired, but when image is taken from camera the intent returns null.

Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
startActivityForResult(cameraIntent,YOUR_SELECT_PICTURE_REQUEST_CODE);
Lal
  • 14,726
  • 4
  • 45
  • 70
MostWant3d
  • 111
  • 7

1 Answers1

3
<activity
            android:name="com.example.AddPhotoActivity"
            android:label="Add Photo"
             android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
          >

by adding this in manifest i can store my activty last state and then my activity is not started again but resume from previuos state and camera intent not return null

android:configChanges="orientation|screenSize"
MostWant3d
  • 111
  • 7
  • Thank you! After hours of searching this worked. I'm keen to understand why. Could you please point me to where in the docs I might find more info? – Christopher Mills Sep 19 '17 at 18:27