我正在尝试在不使用相机意图的情况下实现我自己的相机。
当我尝试从相机.getParameters().getSupportedPreviewSize()设置最高分辨率时,它不会在某些设备上显示预览。它适用于大多数人,但不是所有人。。。
这是我的res支持列表
尺寸1280 960尺寸1280 720尺寸800 480尺寸720 720尺寸720 480尺寸640 480尺寸352 288尺寸320 240176号144
不适用于1280*960,但适用于此特定设备的1280*720。是有点神奇还是什么:-/
Tcs寻求帮助!
首先,请注意https://developer.android.com/reference/android/hardware/Camera.Parameters.html:
This class was deprecated in API level 21.
We recommend using the new android.hardware.camera2 API for new applications.
现在,你能更具体地说,在哪些设备上它不起作用吗?这似乎不是你的错,因为有些设备根本不支持每种分辨率。