I have a few people complain that pressing the screen does nothing in my game.
My game, which is all 3D in openGLES2, uses the onTouchEvent to get screen presses and then converts them to 3D cords based on the screen resolution of the default display.
I am calling getHeight and getWidth, which I now notice are deprecated.
Now I could, and will, switch to getSize, but as my users will not comeback and test it again, and none of them are good enough to email so I can check with them, just negative comments on market I thought I’d check on here incase I am doing something else wrong.
So, I want to find the size of the display, is getWindowManager().getDefaultDisplay().getSize() a good and reliable way of doing this?
Or is it possible that I am not even receiving the onTouchEvent for some reason (I am reacting to getAction() == ACTION_DOWN inparticular).
The devices I know about with problems are:
Droid Charge, and
LG P500 (LG Optimus One)
Thanks,
Alan
I think my error was to save off the MotionEvent from the onTouchEvent so that I could process it in the opengl thread.
But they appear to be recycled. So solution was to take a copy of the data I wanted (getRawX and getRawY) and not to use the MotionEvent outside onTouchEvent.