Check your permissions. If you use something like a camera, you need to say that it is not required, and then make sure your code checks it. I had to add the following line โuses-featureโ to my manifest in order to get my application to work.
<uses-feature android:name="android.hardware.camera" android:required="false" />
Then I used the following code to set the flag so that I would not call anything in the application that was trying to use the camera.
PackageManager pm = this.getContext().getPackageManager(); Boolean hasFlashSupport = pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH);
Hope this helps.
source share