Take a look at the logcat info when you get the force close... it will tell
you more informaton about what is going wrong.

On Jan 6, 2010 3:32 AM, "ZhouSu" <zsmarga...@gmail.com> wrote:

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<android-beginners%2bunsubscr...@googlegroups.com>
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-- 
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

Reply via email to