jPCT-AE - a 3d engine for Android > Support

GLSurfaceView + onPause

(1/1)

Andrey8000:
Hello. I try to finish activity in "onPause" when i lock my device:

--- Code: --- public void onPause() {
mGLView.onPause();
mGLView = null;
gameRunning = false;
running = false;
paused = true;
renderer = null;
handler = null;
handlerTimer = null;
workThread = null;
mWorld.world.removeAll();
mWorld.world = null;
mWorld = null;
fb = null;
workThread = null;
gd = null;
mec = null;
MyGame.this.finish();
super.onPause();
}
--- End code ---
But until i unlock device it's no "onStop" and "onDestroy" in Logcat, only this orange text:

--- Quote ---... IInputConnectionWrapper(19178): getExtractedText on inactive InputConnection
--- End quote ---

After that I have to wait a few seconds, then again I see my game screen and only then the activity is completed...

Why the activity is not complete immediately, as in the method "finish()" without blocking device?

EgonOlsen:
I'm not sure what your actual question is here...if you want to end the Activity in onPause, just do System.exit(0); It's not the nice way to exit, but it works.

Andrey8000:
Yes, "System.exit(0);" works right, but again there is no "onStop" and "onDestroy" metods called after "onPause" =/
Well, now I went the other way and it is not important. Thank you.

Navigation

[0] Message Index

Go to full version