Have you tried do the following and seeing what happens?

   - Play another OpenGL game just to get it into the long-press-home menu.
   - Start your game as normal and play it a bit.
   - [long-press-home] and start the previous OpenGL game whilst yours is 
   still running.
   - plays the other game for a bit
   - returns to your game

You you need to re-load your OpenGL context and if so as you did not pause 
and release it, how do you know it needs doing?


On Tuesday, March 5, 2013 6:17:29 PM UTC, latimerius wrote:
>
> On Tue, Mar 5, 2013 at 6:58 PM, TreKing <[email protected] 
> <javascript:>>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