I looked at many examples of andEngine Gles2.0 All of them take these :
private static final int CAMERA_WIDTH = 720;
private static final int CAMERA_HEIGHT = 480;
Why is this value fixed? Why can't I do this:
int currentapiVersion = android.os.Build.VERSION.SDK_INT;
int honeyComb = android.os.Build.VERSION_CODES.HONEYCOMB_MR2;
Display display = getWindowManager().getDefaultDisplay();
if (currentapiVersion >= honeyComb) {
Point size = new Point();
display.getSize(size);
CAMERA_WIDTH = size.x;
CAMERA_HEIGHT = size.y;
} else {
CAMERA_WIDTH = display.getWidth();
CAMERA_HEIGHT = display.getHeight();
}