Mihir Shah
Mihir Shah

Reputation: 1809

Application not open main activity when it is killed after pressing home button in android

In my application activity A calls activity B. In activity B I press home button. and after sometime application is killed. But when I open my app again it opens B instead of activity A even though application is killed before.

Upvotes: 2

Views: 460

Answers (1)

Marcin S.
Marcin S.

Reputation: 11191

Normally when you press home button your current activity is not killed by os. To solve you problem place this

android:noHistory="true"

in manifest file in your Activity B tag. Your activity won't be remembered and when you run your application next time, it will bring you to Activity A

Upvotes: 1

Related Questions