Your renderer thread should be using a WeakReference to your context, getting it and testing it for not null every time it wants to use it. If you get a null back, then bail out as the Activity has gone away.
On Thursday, August 2, 2012 8:45:28 PM UTC+1, Latimerius wrote: > > On Thu, Aug 2, 2012 at 6:50 PM, RichardC <[email protected]> > wrote: > >>how to get reference to GLSurfaceView's rendering thread? > > In your implementation of GLSurfaceView.Renderer.onSurfaceCreated() call > > Thread.currentThread() and put the result somewhere you can get at it. > > Thanks for your suggestion. Although I don't like the solution too > much (it feels like it makes assumptions about implementation details) > I've tested this in the meantime already. Unfortunately it doesn't > work because my initial assumption that the rendering thread exits in > onPause() handler was apparently wrong. It's probably just suspended > so join() hangs. > > Perhaps a better question would be broader - how can I tell the > rendering thread has been suspended? An API on GLSurfaceView is > conceivable and would be comfortable but I don't think there is such a > thing... > -- 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

