Open the phone using jquery mobile and phonegap / cordova
source link: https://www.codesd.com/item/open-the-phone-using-jquery-mobile-and-phonegap-cordova.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Open the phone using jquery mobile and phonegap / cordova
Some one has idea how can i direct open the phone camera of android/ios/windows from phone web browser using the phonegap/cordova js.
Thnx..
create Phonegap Project by following this , after creating project just add camera plugin just look at this link. now you can able to open camera by calling this method
navigator.camera.getPicture( cameraSuccess, cameraError, [ cameraOptions ] );
The camera.getPicture function opens the device's default camera application that allows users to snap pictures. This behavior occurs by default, when Camera.sourceType equals Camera.PictureSourceType.CAMERA. Once the user snaps the photo, the camera application closes and the application is restored.
If Camera.sourceType is Camera.PictureSourceType.PHOTOLIBRARY or Camera.PictureSourceType.SAVEDPHOTOALBUM, then a dialog displays that allows users to select an existing image. The camera.getPicture function returns a CameraPopoverHandle object, which can be used to reposition the image selection dialog, for example, when the device orientation changes.
The return value is sent to the cameraSuccess callback function, in one of the following formats, depending on the specified cameraOptions:
A String containing the base64-encoded photo image.
A String representing the image file location on local storage (default).
You can do whatever you want with the encoded image or URI, for example:
Render the image in an <img> tag, as in the example below
Save the data locally (LocalStorage, Lawnchair, etc.)
Post the data to a remote server
MORE INFO check the above link
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK