我尝试在MegaPixels中检索相机分辨率,如下所示:
android.hardware.Camera cam = android.hardware.Camera.open();
android.hardware.Camera.Size size = cam.getParameters().getPictureSize();
DecimalFormat localDecimalFormat = new DecimalFormat("#.#");
res = "Camera MegaPixel: " + localDecimalFormat.format(size.width * size.height / 1000000.0D);
cam.release();
但我的号码错了,我不知道这是前置摄像头还是后置摄像头,
如何调整前后摄像头?