I was wondering if there is a way to receive callbacks inside the OpenGL thread (meaning NO inter-thread communication).
I've tried to use the Handler
, but I it didn't work, as can be seen here.
Also:
Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
I have some custom Animations in OpenGL which can be initialized. Now I want to receive some sort of callback after the animation is finished. The AsyncTask
would not be the best choice for my purpose, since I am not able to call return
properly in my scenario. The Handler
would have been a good choice - each element would have had a reference to the Handler
and simply send some message with valuable information when the animation is finished.
Is there another way to receive callbacks within the OpenGL thread?