function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
karkar 

Can we access camera of the phone using hybrid app?

I have a build a custom hybrid mobile app. I need to have a button in that app, when touched should open the camera to take pics. Once picture is taken it should save in the local storage and should be used by the users to upload to salesforce later.

Best Answer chosen by Admin (Salesforce Developers) 
bhariharanbhariharan
Yes, this is possible in a hybrid app. You'll need to use the Cordova
camera plugin to accomplish this.

--
Sent from my iPhone

All Answers

bhariharanbhariharan
Yes, this is possible in a hybrid app. You'll need to use the Cordova
camera plugin to accomplish this.

--
Sent from my iPhone
This was selected as the best answer
karkar

Thanks

Gaurav KheterpalGaurav Kheterpal

Yes, you can use this Cordova plugin for OCR part - https://github.com/jcesarmobile

 

Hope this helps.

 

Gaurav

karkar

I'm facing a problem when I add the camera cordova plugin .

When I add a config.xml file for camera access, I'm getting error in the auth.js file. Is there any oauth plugin should be included along with this? 

 

The error is Auth failed. Class not found. 

karkar

And also can we access another custom application that is installed on the phone through our app??? 

Gaurav KheterpalGaurav Kheterpal

Yes, there are multiple ways to do so. One such mechanism is to use this plugin - https://github.com/dmedvinsky/cordova-startapp

 

I hope this helps.

karkar

I tried with the startApp... but it is throwing class not found error

 

window.startapp.start( {android: 'android.provider.Settings.ACTION_SYNC_SETTINGS'},
successCallbackx, failureCallbackx
);

 

Is ter any other way ?