I have an application with 2 activities, LogonAct and MainAct. LogonAct is a logon activity which I want to force the user to go through each time they return to the application. I've set android:clearTaskOnLaunch="true" on LogonAct.
When I first start the app I go through this sequence of screens,
Home -> LogonAct -> MainAct -> Home
I then follow this sequence,
LogonAct -> Back -> MainAct
Why is it bringing me back to MainAct? Shouldn't that activity haven been closed since LogonAct has android:clearTaskOnLaunch="true". I expected to be brought back to Home when I hit the Back button from LogonAct.
Relevant snippets from AndroidManifest.xml,
<activity android:name=".LogonAct" android:clearTaskOnLaunch="true"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <activity android:name=".MainAct"> <meta-data android:name="android.app.default_searchable" android:value=".SearchResults" /> </activity>
I'm using 1.5.
Any help appreciated.