Camera Active Screen not shown on Android 4.2 /4.2 + in Salesforce1 app using Visualforce having accept="image/*;capture=camera"
Trailblazer Community

Camera Active Screen not shown on Android 4.2 /4.2 + in Salesforce1 app using Visualforce having accept="image/*;capture=camera"

VisualForce

Last updated 2016-07-28 ·Reference W-2077563 ·Reported By 56 users

Fixed in version S1-Android-8.0

Summary
accept="image/*;capture=camera" does not kick off Camera on Android 4.2 / 4.2+ from within Salesforce 1 app, however, works if loaded in local browser on mobile device

Repro
-Create a Salesforce1 mobile ready VF page.


VF: testandroid

<apex:page standardController="Document" extensions="cameracontroller">
<apex:messages />
<apex:form id="theForm">
<apex:pageBlock >
<apex:pageBlockSection >
<apex:inputFile value="{!document.body}" filename="{!document.name}" accept="image/*;capture=camera"/>
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>


Controller:

public class cameracontroller {
public cameracontroller (ApexPages.StandardController controller) {
Document d = (Document) controller.getRecord();
d.folderid = UserInfo.getUserId(); //this puts it in My Personal Documents
}
}


-Load the page within Salesforce1 Mobile app, it does not kick off the camera

Workaround
None

Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.