From 0c3698854429e37ef06fae4cfa69d3585ec5429e Mon Sep 17 00:00:00 2001 From: Peter Bakondy Date: Tue, 27 Dec 2016 13:16:48 +0100 Subject: [PATCH] feat(sim): add new methods (#894) --- src/plugins/sim.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/plugins/sim.ts b/src/plugins/sim.ts index 00789683b..1af5c0650 100644 --- a/src/plugins/sim.ts +++ b/src/plugins/sim.ts @@ -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({ @@ -34,4 +43,19 @@ export class Sim { @Cordova() static getSimInfo(): Promise { return; } + /** + * Check permission + * Android only + * @returns {Promise} + */ + @Cordova() + static hasReadPermission(): Promise { return; } + + /** + * Request permission + * Android only + * @returns {Promise} + */ + @Cordova() + static requestReadPermission(): Promise { return; } }