mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
Merge branch 'master' of https://github.com/driftyco/ionic-native
This commit is contained in:
commit
dac013fe7b
@ -62,6 +62,7 @@ import {Printer} from './plugins/printer';
|
||||
import {Push} from './plugins/push';
|
||||
import {SafariViewController} from './plugins/safari-view-controller';
|
||||
import {Screenshot} from './plugins/screenshot';
|
||||
import {Sim} from './plugins/sim';
|
||||
import {SMS} from './plugins/sms';
|
||||
import {SocialSharing} from './plugins/socialsharing';
|
||||
import {SpinnerDialog} from './plugins/spinnerdialog';
|
||||
@ -138,6 +139,7 @@ export {
|
||||
PinDialog,
|
||||
Screenshot,
|
||||
SocialSharing,
|
||||
Sim,
|
||||
Splashscreen,
|
||||
SQLite,
|
||||
StatusBar,
|
||||
@ -207,6 +209,7 @@ window['IonicNative'] = {
|
||||
PinDialog: PinDialog,
|
||||
SafariViewController: SafariViewController,
|
||||
Screenshot: Screenshot,
|
||||
Sim: Sim,
|
||||
SMS: SMS,
|
||||
SocialSharing: SocialSharing,
|
||||
SpinnerDialog: SpinnerDialog,
|
||||
|
35
src/plugins/sim.ts
Normal file
35
src/plugins/sim.ts
Normal file
@ -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; }
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user