Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-29 Thread lbendlin
Seconded. It's the only reason we have it in our app, so users cannot (falsely) accuse us of draining their battery. On Wednesday, November 28, 2012 1:09:48 PM UTC-5, Kristopher Micinski wrote: > > To add, the "exit" button also has the effect of turning off GPS updates, > so "exiting" also has

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-29 Thread Kristopher Micinski
you could simply do it in onPause and take care of that anyway... but yes. kris On Thu, Nov 29, 2012 at 2:23 AM, Johan Appelgren wrote: > You'd probably want to persist data even if you have a confirmation dialog > on back since the user might task switch or press home. > > -- > You received th

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-28 Thread Johan Appelgren
You'd probably want to persist data even if you have a confirmation dialog on back since the user might task switch or press home. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@goo

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-28 Thread TreKing
On Wed, Nov 28, 2012 at 5:30 PM, Subodh Nijsure wrote: > Some of my screens have 5-8 items that users enter stuff like name, > address, some other data. I just don't want users to enter say 80% of data > and loose that data just because they hit back button one two many times.. > Is there another

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-28 Thread Kristopher Micinski
Instead of asking the user if they'd like to quit, I'd simply save the data and then restore it, but maybe that's just me. For lightweight things like this you can persist them in a SharedPreferences. This sort of depends on your use case, but I think you've confused people, because you're not re

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-28 Thread Subodh Nijsure
I had no idea I would spark such a discussion. Only reason I was considering adding 'are you sure you want to exit' button was Some of my screens have 5-8 items that users enter stuff like name, address, some other data. I just don't want users to enter say 80% of data and loose that data just be

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-28 Thread Kristopher Micinski
To add, the "exit" button also has the effect of turning off GPS updates, so "exiting" also has a feature that implies something else: that you quit draining the user's battery. On Wed, Nov 28, 2012 at 12:38 PM, Latimerius wrote: > On Wed, Nov 28, 2012 at 6:24 PM, TreKing wrote: > > On Wed, No

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-28 Thread TreKing
On Wed, Nov 28, 2012 at 11:38 AM, Latimerius wrote: > I'm guessing something about Navigation must be somehow expensive or slow > so they had to put > that check in. > The check if you really want to exit, in the google navigation case, I * think* is for convenience and safety. Like I stated bef

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-28 Thread Latimerius
On Wed, Nov 28, 2012 at 6:24 PM, TreKing wrote: > On Wed, Nov 28, 2012 at 11:18 AM, TreKing wrote: >> >> On Wed, Nov 28, 2012 at 11:02 AM, Latimerius wrote: >>> >>> Yeah, well, it's probably not by Google, or one that Google had any >>> say in. None of the built-in apps on my devices have an exi

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-28 Thread TreKing
On Wed, Nov 28, 2012 at 11:18 AM, TreKing wrote: > On Wed, Nov 28, 2012 at 11:02 AM, Latimerius wrote: > >> Yeah, well, it's probably not by Google, or one that Google had any >> say in. None of the built-in apps on my devices have an exit button, >> not even games (that in general do include it

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-28 Thread TreKing
On Wed, Nov 28, 2012 at 11:02 AM, Latimerius wrote: > Yeah, well, it's probably not by Google, or one that Google had any > say in. None of the built-in apps on my devices have an exit button, > not even games (that in general do include it AFAICT). > Google Maps Navigation has "Exit Navigation"

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-28 Thread Latimerius
Yeah, well, it's probably not by Google, or one that Google had any say in. None of the built-in apps on my devices have an exit button, not even games (that in general do include it AFAICT). One would think users would be used to not having to exit explicitly their phone, SMS, camera apps, plus

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-28 Thread bob
My car navigation app has an Exit button. In the upper right corner. I think it's the built-in app too. On Wednesday, November 28, 2012 5:04:29 AM UTC-6, latimerius wrote: > > On Tue, Nov 27, 2012 at 10:31 PM, RichardC > > wrote: > > This sounds like an Android anti-pattern. I would sug

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-28 Thread Latimerius
On Tue, Nov 27, 2012 at 10:31 PM, RichardC wrote: > This sounds like an Android anti-pattern. I would suggest you design your > app so that is does not need a "do you want to quit". > > 1) onDestroy is not guaranteed to be called. > 2) end-users do not expect apps to ask them I they should quit.

Re: [android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-27 Thread TreKing
On Wed, Nov 28, 2012 at 12:40 AM, shiva pendem wrote: > public void onClick(DialogInterface dialog, int id) { > dialog.cancel(); > System.exit(RESULT_OK); > } > 1 - Do not use System.exit, just

[android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-27 Thread shiva pendem
Hi, here is the code to get the confirmation screen, public void onBackPressed() { Builder builder = new AlertDialog.Builder(context); builder.setTitle("application"); builder.setIcon(R.drawable.icon1); builder.setMessa

[android-developers] Re: How do you show 'Are you sure you want to quit' dialog?

2012-11-27 Thread RichardC
This sounds like an Android anti-pattern. I would suggest you design your app so that is does not need a "do you want to quit". 1) onDestroy is not guaranteed to be called. 2) end-users do not expect apps to ask them I they should quit. On Tuesday, November 27, 2012 9:15:36 PM UTC, Subodh Nijsu