简体   繁体   中英

press home, then back to app and press back button,it exits the app

I have android:launchMode="singleInstance" in the manifest file.

I am using google maps and on pressing the overlay -it opens a new intent.If I press back it comes back to the previous activity .

But if I press home button and Hold Home button for few seconds and go back to my app and press back button it exits the app.

Summarizing -> GoogleMapsActivity -> DisplayActivity

here GoogleMapsActivity has android:launchMode="singleInstance" in manifest file.hence I cannot go back to it.

Is there any possibility to send it to GoogleMapsActivity when home button is pressed ,hence the activity would still exist. Or any other way to resolve the problem.

Check the official documentation at: Manifest element and look at android:allowTaskReparenting and android:launchMode sections.

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