-3

I'm working on a launcher app that basically launches other installed apps on the device with an explicit intent and I have a edge case scenario:

An Activity (Act) creates an intent of an application (App) and starts it by calling startActivity(intent).

App get launched, my Activity going to "stop" state.

After a while I want to get back to my application so I click on "back" hard button that closes App and bring my Application to foreground (resume state). This is the wanted behaviour.

Here is the edge case: If I click on the "recent applications" hard button (square icon) while on App is launched, history stack is lost, and when I return to App, and click on "back" hard button - App exists to the Launcher screen and onResume of my application is being called.

I searched the web for a solution for couple of hours now, maybe I'll find a solution here.

Thanks

vishnu narayanan
  • 3,813
  • 2
  • 24
  • 28
Slava Kamzen
  • 519
  • 4
  • 18
  • Your question is not clear. Please give more details or post a picture or somehow explain the desired behaviour and the actual behaviour better. – David Wasser Jun 03 '16 at 09:54

1 Answers1

0

It seems to me you should set android:alwaysRetainTaskState true in your root activity.