react-native-multiple-image-picker
react-native-multiple-image-picker copied to clipboard
Camera not working in Android
I am using library in android. With: await MultipleImagePicker.openPicker({mediaType: 'image'})
- Camera button in first row not open camera here!! Please help me!
@baronha need your help, i am facing same issue.
add options
usedCameraButton: true,
allowedVideoRecording: true,
@filipef101 usedCameraButton is to show camera, camera is visible but nothing happen on click. And i only need to allow images, not video
You probably reject camera permission so it wont ask again or missed adding usage description to info plist
It is not working in OnePlus mobile device, working in all other android device. FYI: @filipef101 @baronha
Something to raise in https://github.com/LuckSiege/PictureSelector Can you also send log cat And, does it occur also with this apk ? https://github.com/LuckSiege/PictureSelector/raw/master/app/demo/demo_2021-11-14_122603_v2.7.3-rc10.apk
it is working fine in above demo apk, i did not have one plus device and my apk is not breaking, only camera is not opening on click on camera.
The issue is package visibility in Android R (api 30), just put the below codes into AndroidManifest.xml then the camera should work.
<uses-feature android:name="android.hardware.camera.any" />
<queries package="${applicationId}">
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" >
</action>
</intent>
<intent>
<action android:name="android.media.action.ACTION_VIDEO_CAPTURE" >
</action>
</intent>
</queries>
wow. I used this way, my app shows camera but it crashes and shows image full of chinese text. What is the reason, tell me. Thank you very much!!
wow. I used this way, my app shows camera but it crashes and shows image full of chinese text. What is the reason, tell me. Thank you very much!!
Can you share the crash logs here?
The issue is package visibility in Android R (api 30), just put the below codes into AndroidManifest.xml then the camera should work.
<uses-feature android:name="android.hardware.camera.any" /> <queries package="${applicationId}"> <intent> <action android:name="android.media.action.IMAGE_CAPTURE" > </action> </intent> <intent> <action android:name="android.media.action.ACTION_VIDEO_CAPTURE" > </action> </intent> </queries>
This solution worked well, thanks @yong-ling!
@baronha The documentation needs a urgent update, because any Android api above 29 worked well without add these codes into AndroidManifest.xml.