Hi,
I am using the Native Camera Reactive O11 component in a mobile application that leverages the in-app-browser plugin of OutSystems to load other OutSystems Reactive apps. I've encountered an issue specific to the Android OS.
Description of the Issue:
iOS Behavior: When using the component within the in-app-browser plugin, the iPhone camera opens as expected.
Android Behavior: Instead of opening the camera, it opens the device's file selector, which is not the intended functionality.
Browser Behavior: When using the component in a browser, it correctly opens the camera. You can experiment with the original code here.
I would appreciate any pointers or solutions to this issue.
Thank you.
The issue occurs because Android's in-app browser plugin defaults to the file picker instead of the camera. To fix this:
Check Permissions: Ensure the app has CAMERA and READ_EXTERNAL_STORAGE permissions.
Use Direct Camera API: Instead of the in-app browser, use OutSystems’ native Camera API to open the camera.
Modify capture Attribute: Ensure your file input has the capture="camera" attribute to force camera access.
Check WebView Settings: Ensure the WebView or Cordova plugin allows camera access on Android.