cordova-plugin-camera-permission
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

cordova-plugin-camera-permission

Handle and request camera permission on Android.

Depends on cordova-android >= 12 (below version 12 it is not needed).

This plugin defines a global navigator.camera object, which provides an API for handling the camera permission of the device.

Although the object is attached to the global scoped navigator, it is not available until after the deviceready event.

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    console.log(navigator.camera);
}

Installation

cordova plugin add cordova-plugin-camera-permission

It is also possible to install via repo url directly ( unstable )

cordova plugin add https://github.com/kappxl/cordova-plugin-camera-permission.git

Usage

If using a Framework like quasar, check if platform is android before use:

navigator.camera.handlePermission(successCallback, errorCallback)

Package Sidebar

Install

npm i cordova-plugin-camera-permission

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

9.47 kB

Total Files

6

Last publish

Collaborators

  • kappxl