Indie6
Indie6

Reputation: 11

Application crash on power button

I am making a game(Landscape mode) in AndEngine GLES 2.0 and facing very weird problem. When I press power button -> power button -> unlock phone, the game restarts automatically. I've done some testing:

Not working:

Working:

I wonder if there is some change in the power button management of 4.0. and above?
If I change my game to portrait mode then there is no problem at all.

I also have placed the orientationChanged settings in the manifest but the problem still exists

Upvotes: 0

Views: 285

Answers (1)

Plastic Sturgeon
Plastic Sturgeon

Reputation: 12527

I had a problem that was similar, but not resulting in an application crash. Just that the game did not restart successfully. It turned out the problem for me was using static references. Your problem may be caused by your textures. I don't think its documented anywhere, but using ANY static reference to a texture can cause a number of bad outcomes when resuming a game. However its fine to use a Singleton to manage your textures.

Upvotes: 1

Related Questions