mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-13 19:29:37 +08:00
37 lines
904 B
TypeScript
37 lines
904 B
TypeScript
import { Cordova, Plugin } 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
|
|
* ```typescript
|
|
* 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; }
|
|
|
|
}
|