[android-developers] Re: Warning before exiting app?

2009-08-01 Thread Gregg Reno
I figured this out. I was doing this: this.mainIntent = PendingIntent.getActivity(this, 0, new Intent (this, MyActivity.class), 0); which created a new intent that was used to create the the notification. Instead I do this: this.mainIntent = PendingIntent.getActivity(this, 0,

[android-developers] Re: Warning before exiting app?

2009-07-31 Thread Gregg Reno
Thanks Dianne - I appreciate the response. Instead of prompting for exit, I decided to capture the back button keypress, then send the app to the background like this: public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) {

[android-developers] Re: Warning before exiting app?

2009-07-31 Thread Gregg Reno
Sorry, one more new problem that is odd.. Using this method, my app is running in the background. If I launch the app again from the home screen using the application icon, it correctly switches to my running app. However, if the user pulls down the notification list and clicks my notification

[android-developers] Re: Warning before exiting app?

2009-07-29 Thread Dianne Hackborn
You probably shouldn't count pressing the back button as closing the app as you describe here. If there is some ongoing work that it does in the background, you should have a separate UI for the user to start and stop that work, and the ongoing notification should take the user to the