I am re-writing an app for most versions of Android. The app is set to call android.hardware.Camera.Open() on launch. When the app launches it gives the error Camera Error: Could not connect to camera
The permissions in AndroidManifest.xml are
<uses-permission android:name="android.permission.FLASHLIGHT"/>
<uses-permission android:name="android.permission.camera"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>`.
Why can't it connect to the camera?
Problem solved!
The issue was simply a matter of capitalization. The line
<uses-permission android:name="android.permission.camera"/>should actually read<uses-permission android:name="android.permission.CAMERA"/>. This happened becausecamerais a hardware feature, whileCAMERAis a permission.