I\'m working on a simple game for android using openGL es 2.0. Game will be in 2D, something like old supermario, where player can move left-right/up-down but no depth.
I've solved this by modifying parameters for Matrix.frustumM so they represent FOV. Than when you know angle from middle to side, you can calculate offset with tangens function.
GLES20.glViewport(0, 0, width, height);
float ratio = (float) width/height;
float near = 1.0f;
float far = 150.0f;
float fov = 80;
float top = (float) (Math.tan(fov * Math.PI / 360.0f) * near);
float bottom = -top;
float left = ratio * bottom;
float right = ratio * top;
offsetY = (float) (Math.tan(Math.PI/180*fov/2) * Math.abs(cameraAway));
offsetX = offsetY * ratio; //because we know ratio between x and y
Matrix.frustumM(mProjectionMatrix, 0, left, right, bottom, top, near, far);
You can also use Matrix.perspectivM(), but it is only avaliable for api 14+.