Eason
Eason

Reputation: 518

Android press home screen buttom and close application

When I pressed the home button, it will return to home, but the app is still running in the background.

How can I make my app completely shut down after pressing the home button?

Upvotes: 0

Views: 740

Answers (2)

Najeebullah Shah
Najeebullah Shah

Reputation: 3709

Check out the solution of this question and override accordingly.

Can I override the 'Home' button in my application?

Upvotes: 1

Khubab Hamza
Khubab Hamza

Reputation: 176

android:clearTaskOnLaunch="true" 
            android:launchMode="singleTask"
            android:excludeFromRecents="true"

Add these lines inside the Aandroid Manifest in activity that you launches...

Upvotes: 1

Related Questions