in Ionic by
How can you access mobile phone native functionality in Ionic applications, for example the camera?

► Click here to show 1 Answer

0 votes

Ionic does not provide a camera API out of the box. However, since Ionic uses plugins architecture, and because it is based on Cordova, we can use Cordova plugins in our application. Ionic team provides a set of Cordova extensions with Angular wrappers, and they can be found at ngCordova.

To use Cordova plugins, we need to install the plugin using Ionic command install <plugin name>. In some cases, we will additionally need to add the plugin’s Angular module to your Angular application too.

To use a mobile phone’s camera in the Ionic application, we can call the camera API by using cordova-plugin-camera that is hosted on GitHub. This plugin defines a global object, which provides an API for taking pictures and for choosing images from the system’s image library.

Learn More with Madanswer

Related questions

0 votes
asked Jul 24, 2020 in Ionic by Robindeniel