forked from pocesar/react-native-sim-data
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
49 lines (44 loc) · 991 Bytes
/
Copy pathindex.ts
File metadata and controls
49 lines (44 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/// <reference path="extend.d.ts" />
'use strict'
import { NativeModules } from 'react-native'
export interface RNSimData {
carrierName0: string;
displayName0: string;
countryCode0: string;
mcc0: string;
mnc0: string;
isNetworkRoaming0: string;
isDataRoaming0: string;
simSlotIndex0: string;
phoneNumber0: string;
deviceId0: string;
simSerialNumber0: string;
subscriptionId0: string;
carrierName1: string;
displayName1: string;
countryCode1: string;
mcc1: string;
mnc1: string;
isNetworkRoaming1: string;
isDataRoaming1: string;
simSlotIndex1: string;
phoneNumber1: string;
deviceId1: string;
simSerialNumber1: string;
subscriptionId1: string;
}
const RNSimData = NativeModules.RNSimDataModule
export default {
getSimInfo() {
return RNSimData
},
getTelephoneNumber() {
return RNSimData.phoneNumber0
},
getCarrierName() {
return RNSimData.carrierName0
},
getCountryCode() {
return RNSimData.countryCode0
}
}