I have a React web app and I want that the user click a button an open the camera if it's in mobile device, in order to select pictures from the gallery or take photos directly with the camera. With React Native is quit easy, but I need to do it in web, with browers.
I have test the npm library https://www.npmjs.com/package/react-webcam but that library display the webcam in the web, I want to open the mobile interface, any idea?
You cannot access native android libraries with reactJS(that's why we use React-Native or Android SDK), someone is still to create a library for this.
You can always ask the user to upload an image instead.
Code: https://codesandbox.io/s/elated-shannon-5yg9x?file=/src/index.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With