uppy icon indicating copy to clipboard operation
uppy copied to clipboard

On mobiles, open native camera interface instead of webcam.

Open Pixney-William opened this issue 2 years ago • 9 comments

I am looking for a way, from the dashboard, to use camera but without the webcam view on my mobile. I would like to use my phones native ui to capture the photo basically. Is this possible?

Pixney-William avatar Jan 28 '22 20:01 Pixney-William

It is currently possible with “My Device” or “Browse files” buttons, you get the standard system dialog, which on mobile devices includes the “take picture” option. But you are likely talking about the Webcam plugin button automatically doing that on mobile? It’s a good idea, I wonder if we could just build this as an option, without extra plugins, into mobile Dashboard. But then we need to hide the “desktop” Webcam on mobile, so we don’t get too buttons 🤔

arturi avatar Jan 31 '22 02:01 arturi

Awesome @arturi !

A follow up question: When i am using the dashboard/dashboard modal with the vue library and clicking on my device, i am taken directly into my local storage. But when i try your demo on the website, i am indeed presented with the option to use my camera or use the local storage.

Is there a setting that controls this that i am totally missing, or is there a difference between how the vue wrapper works?

Pixney-William avatar Feb 08 '22 13:02 Pixney-William

Could you share a screenshot, please? If it’s the same Dashboard on the same device, behaviour shouldn’t be different with the Vue wrapper or vanilla JS.

arturi avatar Feb 08 '22 14:02 arturi

Hey again @arturi , here comes a screenshot.

I just discovered however, that if i disable (uncheck) the restrictions checkbox on your example. It is the same behaviour. So Maybe its one of those settings in restrictions that i need to set to allow for the native camera selection to appear? Could it be i need to allow video?

image

Pixney-William avatar Feb 08 '22 14:02 Pixney-William

It was, as soon as i added restrictions to it, it worked.

Pixney-William avatar Feb 08 '22 14:02 Pixney-William

I'm experiencing this same issue. I'm running Uppy in React inside Cordova on Android.

In my React app, I have showNativePhotoCameraButton set to true for the Dashboard component, but when I tap it, I only get the browse files screen. Same for showNativeVideoCameraButton. I have the Webcam plugin working and it correctly accesses the camera, so it's not an Android permissions issue. It's just this native button that's not working.

I have tried adding some restrictions as per @Pixney-William's comment but I'm just stabbing in the dark really, and nothing I do gets it working. @Pixney-William, what restrictions did you add to get it working?

sc0ttdav3y avatar Nov 20 '22 02:11 sc0ttdav3y