tags:

views:

32

answers:

0

I have an activity that I want to programmatically stop after some elapsed time. I have a GL view running.

My understanding is that the GLSurfaceView.renderer is running in its own thread, so I created a handler instantiated from the activity. In the GLSurfaceView I post a message. The handler then attempts to stop the activity with the following:

onStop();
finish();

The activity seems to close. However, if I try to restart the application, I get a blank screen, the phone is practically locked up and eventually I get a message that the activity in the application is not responding.

I'm also getting geting a wake lock, ie PowerManager.newWakeLock(...). When I try to release it, I get an exception.

Not sure if its the GL view of the wake lock which is causing me troubles. Any ideas appreciated.