Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid app always opens the first activity on resuming
    text
    copied!<p>I'm working on an application that currently has two activites, a log in activity and a "frontpage" activity after that.</p> <p>Whenever I switch away from the application and resume it either by relaunching it or using the application switcher, it will always re-open the log in activity. Even if I switch to my app from within the frontpage activity, it opens the log in activity.</p> <p>None of my other apps have ever done this, even though they obviously all have a filter for the launcher in AndroidManifest.xml. I am aware that it is supposed to do this when the activity is killed, but I cannot comprehend why it would do that.</p> <p>This is my AndroidManifest.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="nl.vertinode.facepunch" android:versionCode="1" android:versionName="1.0"&gt; &lt;!-- Android 2.2 --&gt; &lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" /&gt; &lt;!-- Internet access --&gt; &lt;uses-permission android:name="android.permission.INTERNET" /&gt; &lt;application android:icon="@drawable/icon" android:label="@string/app_name" android:name=".FPApp"&gt; &lt;!-- Login form --&gt; &lt;activity android:name="nl.vertinode.facepunch.LoginActivity" android:launchMode="singleTask" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateHidden"&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;!-- Frontpage view --&gt; &lt;activity android:name="nl.vertinode.facepunch.FrontpageActivity" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateHidden"&gt; &lt;/activity&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p>What could I be doing wrong?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload