Skip to content

Commit

Permalink
feat(sim): add new methods (#894)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbakondy authored and ihadeed committed Dec 27, 2016
1 parent c28df73 commit 0c36988
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/plugins/sim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ import { Cordova, Plugin } from './plugin';
* (info) => console.log('Sim info: ', info),
* (err) => console.log('Unable to get sim info: ', err)
* );
*
* Sim.hasReadPermission().then(
* (info) => console.log('Has permission: ', info)
* );
*
* Sim.requestReadPermission().then(
* () => console.log('Permission granted'),
* () => console.log('Permission denied')
* );
* ```
*/
@Plugin({
Expand All @@ -34,4 +43,19 @@ export class Sim {
@Cordova()
static getSimInfo(): Promise<any> { return; }

/**
* Check permission
* Android only
* @returns {Promise<any>}
*/
@Cordova()
static hasReadPermission(): Promise<any> { return; }

/**
* Request permission
* Android only
* @returns {Promise<any>}
*/
@Cordova()
static requestReadPermission(): Promise<any> { return; }
}

0 comments on commit 0c36988

Please sign in to comment.