Re: [android-developers] Re: exit strategy

2011-01-15 Thread TreKing
On Sat, Jan 15, 2011 at 2:50 AM, JAlexoid (Aleksandr Panzin) <
jalex...@gmail.com> wrote:

> The ADB kills it with reinstall... So he could have missed it...


True - in which case I wouldn't call that proper testing. Once you think
you're ready to release something, you should be running it as the user
would run it - directly from your phone with no adb or debugger, to make
sure everything works as intended - including backing out.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
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@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: exit strategy

2011-01-15 Thread Kevin Duffey
I thought you weren't really supposed to "quit" an app? I know the Android
system will kill an app when necessary to reclaim resources. I have seen
apps, including google maps that allow you to exit. In the case of google
maps, if you're using the navigation, and don't exit, it keeps on talking
and drains your battery pretty fast. I've learned from experience to exit
that app! So I guess I can see a time when it should exit. But I thought by
listening to the activity events of pause/resume, and so forth you can use
those to exit the app gracefully?

For that matter, since games use threads, don't they have to stop the
threads, save state, and such when a user presses home to exit out of it?

Lastly, I thought we're never to try to block the home button? I didn't even
know that was possible.

On Sat, Jan 15, 2011 at 11:45 AM, TreKing  wrote:

> On Sat, Jan 15, 2011 at 2:50 AM, JAlexoid (Aleksandr Panzin) <
> jalex...@gmail.com> wrote:
>
>> The ADB kills it with reinstall... So he could have missed it...
>
>
> True - in which case I wouldn't call that proper testing. Once you think
> you're ready to release something, you should be running it as the user
> would run it - directly from your phone with no adb or debugger, to make
> sure everything works as intended - including backing out.
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>
>  --
> 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@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
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@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: exit strategy

2011-01-15 Thread TreKing
On Sat, Jan 15, 2011 at 2:35 PM, Kevin Duffey  wrote:

> I thought you weren't really supposed to "quit" an app?
>

Right - but you should "back out" of your app and make sure whatever
lifecycle methods you're handling work correctly.


> But I thought by listening to the activity events of pause/resume, and so
> forth you can use those to exit the app gracefully?
>

Precisely - it's these methods one should be testing when entering and
leaving the app.


> For that matter, since games use threads, don't they have to stop the
> threads, save state, and such when a user presses home to exit out of it?
>

Ideally - I would assume a game would enter some "paused" state.


> Lastly, I thought we're never to try to block the home button? I didn't
> even know that was possible.
>

It's not.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
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@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: exit strategy

2011-01-15 Thread Frank Weiss
Another problem with bluntly killing the app's process is that Android keeps
information about the app's state elsewhere.

-- 
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@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: exit strategy

2011-01-15 Thread Dianne Hackborn
On Sat, Jan 15, 2011 at 12:35 PM, Kevin Duffey  wrote:

> I thought you weren't really supposed to "quit" an app? I know the Android
> system will kill an app when necessary to reclaim resources. I have seen
> apps, including google maps that allow you to exit. In the case of google
> maps, if you're using the navigation, and don't exit, it keeps on talking
> and drains your battery pretty fast. I've learned from experience to exit
> that app! So I guess I can see a time when it should exit. But I thought by
> listening to the activity events of pause/resume, and so forth you can use
> those to exit the app gracefully?
>

In navigation, exit isn't exiting the app, it's exiting the active (very
power hungry) navigation mode of the app.


> For that matter, since games use threads, don't they have to stop the
> threads, save state, and such when a user presses home to exit out of it?
>

Yes they should.  Which is the same as if the user receives a phone call,
etc. When the user leaves your app for whatever reason, you should stop your
execution.  Of course this is fuzzy: if the user has explicitly asked you to
continue doing some work (playing music, navigating) then of course you will
do so (but this work is associated with a service, not an activity); and
some apps may continue doing some remaining work immediately after the user
leaves, such as finishing the retrieval of a web page in the browser.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: exit strategy

2011-01-15 Thread Kevin Duffey
Ok..good, then what I've read and understood are correct!!

BTW, Diane, kudos to the Android 2.3 team! I am surprised it's not a 3.0
release with all the.. in my opinion.. huge additions to the native side. I
can't wait to see (and hopefully use) the games and music apps that will
finally be comparable to iPhone games/music apps!

On Sat, Jan 15, 2011 at 3:36 PM, Dianne Hackborn wrote:

> On Sat, Jan 15, 2011 at 12:35 PM, Kevin Duffey wrote:
>
>> I thought you weren't really supposed to "quit" an app? I know the Android
>> system will kill an app when necessary to reclaim resources. I have seen
>> apps, including google maps that allow you to exit. In the case of google
>> maps, if you're using the navigation, and don't exit, it keeps on talking
>> and drains your battery pretty fast. I've learned from experience to exit
>> that app! So I guess I can see a time when it should exit. But I thought by
>> listening to the activity events of pause/resume, and so forth you can use
>> those to exit the app gracefully?
>>
>
> In navigation, exit isn't exiting the app, it's exiting the active (very
> power hungry) navigation mode of the app.
>
>
>> For that matter, since games use threads, don't they have to stop the
>> threads, save state, and such when a user presses home to exit out of it?
>>
>
> Yes they should.  Which is the same as if the user receives a phone call,
> etc. When the user leaves your app for whatever reason, you should stop your
> execution.  Of course this is fuzzy: if the user has explicitly asked you to
> continue doing some work (playing music, navigating) then of course you will
> do so (but this work is associated with a service, not an activity); and
> some apps may continue doing some remaining work immediately after the user
> leaves, such as finishing the retrieval of a web page in the browser.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
>  --
> 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@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
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@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: exit strategy

2011-01-15 Thread Dianne Hackborn
On Sat, Jan 15, 2011 at 4:28 PM, Kevin Duffey  wrote:

> BTW, Diane, kudos to the Android 2.3 team! I am surprised it's not a 3.0
> release with all the.. in my opinion.. huge additions to the native side. I
> can't wait to see (and hopefully use) the games and music apps that will
> finally be comparable to iPhone games/music apps!
>

Thanks!  I appreciate the thought, but am happy not calling 2.3 a 3.0
release.  There are a few areas that got a lot of improvement (NDK being the
big one), but it's not the order of magnitude as say 2.0 or stuff coming up.
:)

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en