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);
<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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With