Activity killed / onCreate called after taking picture via intent

Actually the camera causes the orientation change in your activity that is why your activity is being destroyed and recreated.

Add this in your manifest file it will prevent the orientation change and your activity will not get destroyed and recreated.

<activity
    android:name=".YourActivity"
    android:configChanges="orientation|keyboardHidden|screenSize"
    android:screenOrientation="portrait" >
</activity>

Leave a Comment