Sim

Improve this doc

$ ionic plugin add cordova-plugin-sim
$ npm install --save @ionic-native/sim

Repo: https://github.com/pbakondy/cordova-plugin-sim

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.

Supported platforms

Usage

import { Sim } from '@ionic-native/sim';


constructor(private sim: Sim) { }

...

this.sim.getSimInfo().then(
  (info) => console.log('Sim info: ', info),
  (err) => console.log('Unable to get sim info: ', err)
);

this.sim.hasReadPermission().then(
  (info) => console.log('Has permission: ', info)
);

this.sim.requestReadPermission().then(
  () => console.log('Permission granted'),
  () => console.log('Permission denied')
);

Instance Members

getSimInfo()

Returns info from the SIM card.

Returns: Promise<any>

hasReadPermission()

Platforms:Android 

Check permission

Returns: Promise<any>

requestReadPermission()

Platforms:Android 

Request permission

Returns: Promise<any>

API

Native

General