Hi, thanks for responding :) I tried couple times. Latest : Intent intent = pm.getLaunchIntentForPackage(packagename); intent.setClassName(mContext, MainActivity.class.getName()); intent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT | Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY| Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent);
i also tried previously: Intent intent = new Intent(context, MainActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); Thanks On Oct 29, 2:54 pm, XC He <schosnab...@gmail.com> wrote: > How do you start the intent ?? > > 2010/10/29 sleith <raysle...@gmail.com>: > > > Hi, > > i know this question has been ask many times, but i still don't find a > > solution... need helps :) > > > I tried to handle about the hold screen button that makes screen off. > > Somehow the game is exit because of this. > > Then i try using broadcast listener for screen on/off and when > > detecting off the app will call moveTaskToBack(false) which > > successfully saved the state of the game. > > > When i turn on the screen, I tried launch manually from homescreen and > > the game can resume the previous state (this means moveTaskToBack is a > > success). > > > Because i need the phone to automatically bring the game to the front, > > i try to make a background service that receive command from the > > screen listener to launch intent. > > But the game start from the beginning instead of resuming last state. > > > So what i might missed is how to launch an intent to bring from back > > to front just like we run the app from homescreen. > > > Need help, thx >.< > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en