0

When you long press the homoe button and select an app from the recent apps, this app comes to the foreground the way you left it, in the same activity. How can someone launch an app simulating this behavior ? Something like this.. :

if (there is a stack for this app in system memory):  restore it
else : launch it the usual way.

Just to make it clear i'm talking about launching an OTHER app from withing MY app. And of course i am reffering to the apps whose previous state exists in the OS memory at the given momment.

Anonymous
  • 4,470
  • 3
  • 36
  • 67

2 Answers2

0

Since that depends on how the other program is written I don't think you can. The android OS will when in need of memory close down activities and unless that program stores it's state you would have to store the state for that app. That I think can not be done, perhaps if you hack your phone but that's something I'd not recommend.

Johan
  • 753
  • 2
  • 11
  • 31
  • i know OS deletes data like this when in need...That's why i said if ( there is a stack for the given app at the given momment). I have an app that does this (among other things )in my rooted device. I don't suppose it's something that needs root access to be done – Anonymous Feb 03 '14 at 13:25
0

This totally depends on the other apps design. If other apps dont support Intent Filters from which they can be called by any app, I suspect that is not possible because all apps run in their own instance of DVM and sandboxed.

SMR
  • 6,628
  • 2
  • 35
  • 56
  • Even if there is no way to do it directly....If Android OS does it, it means that there must be a way to poke the OS to do it on demand. Doesn't that make sence? – Anonymous Feb 03 '14 at 13:27
  • Well i think it may be possible if the app has root privileges. But still have no idea how to trigger that. – SMR Feb 03 '14 at 13:30