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: public

[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);

[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);

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

2011-08-11 Thread TreKing
On Wed, Aug 10, 2011 at 10:05 AM, xzoom yoni.se...@gmail.com 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 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

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. snip 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

[android-developers] how can close other activity?

2009-08-04 Thread tstanly
hi all, for example,I have three activity now, a, b and c, a is start point of activity lifecycle, and can go to b or c, and then assume go to b from a and close a, and then go to c from b but will not close b, and this time, I want to check whether b is start(create) or not, if b start, I