[SalesForce] Can Salesforce1 access device camera

Does the Salesforce1 App have the ability to access a device's camera to perform a scan in real time using zxing or some similar library?

I understand that there is a method to "read" a barcode using a static image. However this is not a desirable solution for me. Please see this question for further details on that.

I created a native Android app that uses zxing to capture barcode information and create a url with parameters, however I had to abort this because I was unable to get the url parameters to Salesforce1 using a deep link.

My requirement is to scan a barcode, store the information and auto populate a Visualforce page in Salesforce1 based on the information scanned. Within my native app I was able to successfully scan a barcode, construct a url with parameters and populate a Visualforce page on the actual Salesforce site (https:///apex/Barcode_Scanner_Page?item=b5xU000000085ot). But the deep link technique (salesforce1://sObject/001D000000Jwj9v/view
) was unable to pass parameters to a Visualforce page.

Best Answer

You're not going to be able to use the camera in Salesforce1; it does not have the Camera permission on any devices, as far as I can tell. According to the Window API documentation, you should be able to use getUserMedia in Lightning Experience; you'll just need to write yourself a component that calls the appropriate methods. It's probably time for you to consider moving to Lightning Experience.