I have an app that uses intent-filters
in the AndroidManifest.xml
file to start an Activity
when the Home button is pressed. Thing is, if my app is on that time in a different activity, the LoginActivity
is started again and the user has to log in again. I want the Home button to do nothing if my app is on top.
How could I do that?
<activity
android:name="com.example.LoginActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>