On Tue, Mar 5, 2013 at 6:58 PM, TreKing <[email protected]> wrote:

>
> Threads you can start and stop with onPause / onResume. Assuming it's that
> simple in your case (I'm going to guess it's not =P )
>

Admittedly, I could probably stop my game thread in the main activity
onPause() and resume it in my preference activity onResume() (if that's
reached) - perhaps bit kludgy but OK.

I'm not quite sure about the rendering thread though - that's controlled by
GLSurfaceView and I'm afraid I can't just pause it with no other
side-effects.  I think the only way would be to
call GLSurfaceView.onPause() which however also means a lot of other
undesirable things including GL context loss and the subsequent need to
reload all geometry and textures.


> Also, audio has to be stopped as soon as user leaves the app.
>>
>
> This can also be stopped / resumed with onPause / onResume. I assume - I
> haven't needed custom audio in my app.
>

That would mean an audible drop-out I'm afraid.


>  The same goes for analytics session, it should to be closed right when
>> the user leaves otherwise it would be hard to get accurate data about
>> session length.
>>
>
> That's tricky, even without your specific requirements. "A session" in
> Android is notoriously hard to determine.
>

Sure, sure.  We consciously limit ourselves to just time the app spent on
screen - a crude measure by itself, I know, but why make it even less
precise. ;-)


>   And for saving data, onDestroy() is explicitly documented to be a bad
>> choice.
>>
>
> Absolutely - I was suggesting onDestroy for all the clean up you stated
> you needed to do.
>
> Anyhow, you know your requirements better than I - just putting out some
> food for thought. Good luck.
>

Thanks for taking interest in my problem!

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to