简体   繁体   中英

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 BI 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM