mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
Merge branch 'master' of github.com:ionic-team/ionic-native
This commit is contained in:
commit
8f00e44d21
@ -18,13 +18,15 @@ import { Injectable } from '@angular/core';
|
||||
* ...
|
||||
*
|
||||
* this.androidPermissions.checkPermission(this.androidPermissions.PERMISSION.CAMERA).then(
|
||||
* success => console.log('Permission granted'),
|
||||
* result => console.log('Has permission?',result.hasPermission),
|
||||
* err => this.androidPermissions.requestPermission(this.androidPermissions.PERMISSION.CAMERA)
|
||||
* );
|
||||
*
|
||||
* this.androidPermissions.requestPermissions([this.androidPermissions.PERMISSION.CAMERA, this.androidPermissions.PERMISSION.GET_ACCOUNTS]);
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* Android 26 and above: due to Android 26's changes to permissions handling (permissions are requested at time of use rather than at runtime,) if your app does not include any functions (eg. other Ionic Native plugins) that utilize a particular permission, then `requestPermission()` and `requestPermissions()` will resolve immediately with no prompt shown to the user. Thus, you must include a function utilizing the feature you would like to use before requesting permission for it.
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AndroidPermissions',
|
||||
|
Loading…
Reference in New Issue
Block a user