-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add sim plugin * Fix pluginRef
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import {Plugin, Cordova} from './plugin'; | ||
|
||
/** | ||
* @name Sim | ||
* @description | ||
* Gets info from the Sim card like the carrier name, mcc, mnc and country code and other system dependent info. | ||
* | ||
* Requires Cordova plugin: `cordova-plugin-sim`. For more info, please see the [Cordova Sim docs](https://github.com/pbakondy/cordova-plugin-sim). | ||
* | ||
* @usage | ||
* ```js | ||
* import {Sim} from 'ionic-native'; | ||
* | ||
* | ||
* Sim.getSimInfo().then( | ||
* (info) => console.log('Sim info:', info), | ||
* (err) => console.log('Unable to get sim info:', err) | ||
* ); | ||
* ``` | ||
*/ | ||
@Plugin({ | ||
plugin: 'cordova-plugin-sim', | ||
pluginRef: 'plugins.sim', | ||
repo: 'https://github.com/pbakondy/cordova-plugin-sim', | ||
platforms: ['Android', 'iOS', 'Windows Phone'] | ||
}) | ||
export class Sim { | ||
/** | ||
* Returns info from the SIM card. | ||
* @returns {Promise} | ||
*/ | ||
@Cordova() | ||
static getSimInfo(): Promise<any> { return; } | ||
|
||
} |