cap-sim-info
v0.1.5
Published
Get SIM Card Info. For Capacitor.
Downloads
609
Readme
vinteum.com
cap-sim-info
Get SIM Card Info. For Capacitor.
npm:
https://www.npmjs.com/package/cap-sim-info
Install
npm install cap-sim-info
npx cap sync
Android Manifest
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
API
Sample:
import { SimInfo } from 'cap-sim-info';
const sims = await SimInfo.getSimInfo();
console.log(sims);
getSimInfo()
getSimInfo() => Promise<{ phoneNumber: string | null; }>
Returns:
{
"simInfo": [
{
"carrierName": "VIVO",
"displayName": "VIVO",
"countryIso": "br",
"iccId": "895510953571576",
"simSlotIndex": 0,
"phoneNumber": "+5546999XXXXXX"
},
{
"carrierName": "Vinteum Telecom",
"displayName": "Vinteum Telecom",
"countryIso": "usa",
"iccId": "895506474390",
"simSlotIndex": 1,
"phoneNumber": "+14912813"
}
]
}