Skip to content

Commit

Permalink
fix(diagnostic): permissionStatus gets values from plugin in runtime
Browse files Browse the repository at this point in the history
fixes #872
  • Loading branch information
ihadeed committed Dec 15, 2016
1 parent 8b809de commit 9986e0d
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/plugins/diagnostic.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Cordova, Plugin } from './plugin';
import {Cordova, Plugin, CordovaProperty} from './plugin';

/**
* @name Diagnostic
Expand Down Expand Up @@ -27,6 +27,7 @@ import { Cordova, Plugin } from './plugin';
* }).catch(e => console.error(e));
*
* ```
*
*/
@Plugin({
pluginName: 'Diagnostic',
Expand Down Expand Up @@ -63,18 +64,19 @@ export class Diagnostic {
BODY_SENSORS: 'BODY_SENSORS'
};

static permissionStatus = {
GRANTED: 'GRANTED',
GRANTED_WHEN_IN_USE: 'GRANTED_WHEN_IN_USE', // iOS
RESTRICTED: 'RESTRICTED', // iOS
DENIED: 'DENIED',
DENIED_ALWAYS: 'DENIED_ALWAYS', // android
NOT_REQUESTED: 'NOT_REQUESTED'
@CordovaProperty
static permissionStatus: {
GRANTED;
DENIED;
NOT_REQUESTED;
DENIED_ALWAYS;
RESTRICTED;
GRANTED_WHEN_IN_USE;
};

static locationAuthorizationMode = {
ALWAYS: 'ALWAYS',
WHEN_IN_USE: 'WHEN_IN_USE'
ALWAYS: 'always',
WHEN_IN_USE: 'when_in_use'
};

static permissionGroups = {
Expand Down

0 comments on commit 9986e0d

Please sign in to comment.