Re: [android-developers] How to close an activity

2011-08-12 Thread leo luo
Hi, If the version u used is before 2.2, I guess u can try this methord: ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); activityManager.restartPackage("packagename"); If the version is 2.2 or later: u may try this: publi

Re: [android-developers] How to close an activity

2011-08-11 Thread TreKing
On Wed, Aug 10, 2011 at 10:05 AM, xzoom wrote: > When I'm back into the menu (activity A) and while activity B is in the > background > If your only interaction between these two is A starting B without any funky Activity flags, this should not be possible. -

[android-developers] How to close an activity

2011-08-11 Thread xzoom
Hi, I have an activity A (a menu) that creates and start activity B (a running game). public void onClick(View v) { switch(v.getId()){ case R.id.start: Intent i = new Intent(this, GameActivity.class);

[android-developers] How to close an activity A and sub activity B that runs in the background?

2011-08-11 Thread xzoom
Hi, I have an activity A (a menu) that creates and start activity B (a running game). public void onClick(View v) { switch(v.getId()){ case R.id.start: Intent i = new Intent(this, GameActivity.class);

Re: [android-developers] How to close an activity when the user clicks on home button

2010-02-19 Thread Mark Murphy
Achanta wrote: > I understand that trying to capture home button clicks is a hack, but > I need to atleast close my current activity when the user clicks on > home button. > I need to do it as I am listening for location updates and I want to > stop the updates and also need to trash any locatio

[android-developers] How to close an activity when the user clicks on home button

2010-02-19 Thread Achanta
I understand that trying to capture home button clicks is a hack, but I need to atleast close my current activity when the user clicks on home button. Is there anyway I can tell the system to close this activity is the user clicks on home button? If so how can I do that? I need to do it as I am li