Hi all! Order to obtain such above Actribute of Activity, in file Manifest we should add android:finishOnTaskLaunch ="true" into Tag<activity>. After that you can bring Task which after press HOME button, to foreground.
Notes: I use Emulator SDK_1.1v.1; V.Nhan!! On 1月21日, 午後11:16, kolby <[email protected]> wrote: > I'm not sure I completely understand what you're trying to do. If the > user pauses an activity by pressing the home button, you shouldn't > bring the application to the foreground again. The user can just press > the application icon in the launcher and the app will be brought to > the foreground again (going through the usual lifecycle callbacks so > you get a chance to restore state, depending on how your app is > configured). > > If you have an application that does something in the background, > reacts to an event, and then wants to be in the foreground again, you > should consider splitting your application into two parts, the > background task as a service, and the UI as an application. Based on > an event in the service launch the UI app as an intent. > > Michael > > On Jan 21, 6:30 am, mongd <[email protected]> wrote: > > > How can I write a code for that behavior? > > I want to bring back the activity without clicking HOME button. > > > On 1월21일, 오후7시56분, "[email protected]" > > > <[email protected]> wrote: > > > a "long click" on the home button brings a popup that lets you choose > > > to switch to a different one of the running applications. > > > > On 21 Jan., 10:20, mongd <[email protected]> wrote: > > > > > Hi, I'm having trouble to figure out how to bring the paused Task back > > > > to foreground. > > > > As far as I understood, when I click HOME button while a task is > > > > running, the task will be paused (onPaused() of the current top-level > > > > activity will be called,right?). I think there might be a way to bring > > > > this paused task back to foreground since the task is still ALIVE, but > > > > I don't know how. > > > > Do I have to put some more codes in the activity (I mean the one that > > > > is paused)? > > > > > Thank you. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

