I'm writing a GPS app and I found that the GPS is still turned on after existing the application using HOME button. Therefore I added a button and did the following:
gpsExit.setOnClickListener(new Button.OnClickListener() { public void onClick(View v){ onDestroy(); }}); but everytime when I clicked the button, it popped out "force close" message. BTW, if i change onDestroy() to finish(), the application works fine so other parts should have no problem. How can I end the application lifecycle successfully? Thanks!
-- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en