Skip to content

Commit

Permalink
fix(android-permissions): fix PERMISSION property and add requestPerm…
Browse files Browse the repository at this point in the history
…ission

closes #1574
  • Loading branch information
ihadeed committed May 17, 2017
1 parent 31983d8 commit ebf4028
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/@ionic-native/plugins/android-permissions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit ebf4028

Please sign in to comment.