The camera plugin is one of the most used plugins and it provides an API for taking photos and choosing images from the gallery. Although navigator.camera is available globally and can be accessed from anywhere, it can only be accessed after device ready.
You can start using this plugin after installing the camera plugin. Ionic Native is already installed with NPM and you can directly import the camera plugin from the ionic-native package:
$ ionic cordova:plugin add cordova-plugin-camera$ npm install @ionic-native/camera --save
There are two main methods in the camera plugin:
- Camera.getPicture
- Camera.cleanup
For taking photos, using the camera, or choosing from the image gallery we use the Camera.getPicture method. It ...