mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-31 19:58:51 +08:00
fix(android-permissions): fix PERMISSION property and add requestPermission
closes #1574
This commit is contained in:
parent
31983d8317
commit
ebf402864b
@ -36,7 +36,7 @@ import { Injectable } from '@angular/core';
|
||||
@Injectable()
|
||||
export class AndroidPermissions extends IonicNativePlugin {
|
||||
|
||||
PERMISSION: {
|
||||
PERMISSION: any = {
|
||||
ACCESS_CHECKIN_PROPERTIES: 'android.permission.ACCESS_CHECKIN_PROPERTIES',
|
||||
ACCESS_COARSE_LOCATION: 'android.permission.ACCESS_COARSE_LOCATION',
|
||||
ACCESS_FINE_LOCATION: 'android.permission.ACCESS_FINE_LOCATION',
|
||||
@ -199,13 +199,21 @@ export class AndroidPermissions extends IonicNativePlugin {
|
||||
@Cordova()
|
||||
checkPermission(permission: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Request permission
|
||||
* @param permission {string} The name of the permission to request
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
requestPermission(permission: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Request permissions
|
||||
* @param permissions {array} An array with permissions
|
||||
* @param permissions {Array<Sstring>} An array with permissions
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
requestPermissions(permissions: string): Promise<any> { return; }
|
||||
requestPermissions(permissions: string[]): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* This function still works now, will not support in the future.
|
||||
|
Loading…
x
Reference in New Issue
Block a user