I have three Activities (A, B and C). Activity A is used to sign in. After a successful sign in Activity A is starts Activity B and then Activity A is killed (using finish()).
Activity B has a button to start Activity C (Activity B has not been finished). Activity C opens the camera onclick(using the camera intent).
When I am on activity C and I press back, Activity B's onResume() is called.
However, when I am on activity C and I start the camera intent and successfully display the image in Activity C and then press back, Activities B onResume() AND onDestroy() gets called and then somehow Activity A is triggered and I have to sign in again instead of just going back to Activity B.
Activity B and C both have the following attributes in the manifest file:
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden|screenSize"
Is there any way to avoid this and just stay on Activity B?
Extracts from the Manifest file
<activity
android:name=".ActivityA"
android:configChanges="orientation|screenSize"
android:label="@string/title_login"
android:screenOrientation="portrait" />
<activity
android:name=".ActivityB"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/Theme.TransparentActionbar" />
<activity
android:name=".ActivityC"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="portrait"
android:theme="@style/Theme.TransparentActionbar" />