[android-beginners] Re: onDestroy() caused "application stopped unexpectedly"

2010-01-10 Thread ZhouSu
Thanks! I finally get it. For those who are referring to this thread, I unregistered location listener under the main Activity: @Override public void onDestroy(){ super.onDestroy(); //unregister location listener locationManager.removeUpdates(locationListener); }

Re: [android-beginners] Re: onDestroy() caused "application stopped unexpectedly"

2010-01-08 Thread TreKing
> > It does stop retrieving GPS signals after I exit the app. If this is why you're doing this, you're going about this the wrong way. Use finish() on your activity, not System.exit(), and if you have a location listener set up that is using the GPS make sure to unregister it in your onPause() /

Re: [android-beginners] Re: onDestroy() caused "application stopped unexpectedly"

2010-01-07 Thread Justin Anderson
Any particular reason you are using System.exit() as opposed to finish()??? finish() gives Android the opportunity to do any cleanup that it needs to when your app gets done... I would imaging that System.exit() bypasses this. --

[android-beginners] Re: onDestroy() caused "application stopped unexpectedly"

2010-01-07 Thread ZhouSu
Thanks Justin and TreKing! I haven't found the error for onDestroy after looking at the log but I've managed to close the application using JAVA System.exit() instead. It does stop retrieving GPS signals after I exit the app. On Jan 7, 2:20 am, TreKing wrote: > > BTW, if i change onDestroy(