phonegap-camera
Phonegap Camera Add-on
This add-on provides you to access phone camera in Phonegap Webview.
Important: This add-on has phonegap-0.0.1 dependency
Important: This component works if only page is requested within Phonegap Webview.
Sample code
package com.devside.vaadin.example; import com.vaadin.ui.CustomLayout; import com.devside.vaadin.addon.pgcamera.PhonegapCamera; import com.devside.vaadin.addon.phonegap.Phonegap; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.TextField; import com.vaadin.ui.UI; public class CamPage extends CustomLayout { public CamPage() { // the Phonegap component should be added in order to include phonegap basic js libraries. addComponent(new Phonegap()); PhonegapCamera camera = new PhonegapCamera(); camera.getCameraState().setButtonStyle("width:100%"); camera.getCameraState().setImageStyle("width:95%;"); // if you want to view the captured image on page this should be true. But some can only get base64 value of image in PictureCaptureListener. camera.getCameraState().setViewEnabled(true); // if viewEnabled is true, viewImageAfterCapture provides to hide image when there is no source . After capturing image , image on page will be shown. camera.getCameraState().setViewImageAfterCapture(true); addComponent(camera); } }
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
- Released
- 2013-08-23
- Maturity
- EXPERIMENTAL
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 7.0+
- Browser
- Android Browser
phonegap-camera - Vaadin Add-on Directory
Phonegap Camera Add-onThis add-on provides you to access phone camera in Phonegap Webview.
Important:
This add-on has phonegap-0.0.1 dependency
Important:
This component works if only page is requested within Phonegap Webview.