@kevindupas/capacitor-telephony-infos
v1.0.9
Published
Extended TelephonyManager for Android — RSRP, RSRQ, SINR, RSSI, VoLTE, VoNR, IP version
Downloads
1,187
Maintainers
Readme
@kevindupas/capacitor-telephony-infos
Extended TelephonyManager for Android — RSRP, RSRQ, SINR, RSSI, VoLTE, VoNR, 5G NSA detection, IP version, MCC/MNC.
Compatibility
| Plugin version | Capacitor | Android API | Highlights |
| -------------- | --------- | ----------- | ----------------------------------- |
| 1.0.9 | 8.x | 24+ | MCC/MNC added to getInfo() |
| 1.0.8 | 8.x | 24+ | Capacitor 8, 5G NSA, VoLTE, VoNR |
| 1.x | 8.x | 24+ | |
iOS note: Raw radio indicators (RSRP, RSRQ, SINR, RSSI), network generation, and SIM operator are not accessible on iOS due to Apple platform restrictions. This plugin is Android-only for radio data.
Install
npm install @kevindupas/capacitor-telephony-infos
npx cap syncAndroid setup
To use this plugin you need to add the following permissions to the AndroidManifest.xml before or after the application tag.
<uses-permission android:name="android.permission.READ_BASIC_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />Note:
READ_PHONE_STATEis required forTelephonyDisplayInfo(5G NSA detection).ACCESS_FINE_LOCATIONis required forgetAllCellInfo()(raw signal metrics RSRP/RSRQ/SINR/RSSI). Both are runtime permissions — the plugin requests them automatically when needed.
API
checkPermissions()requestPermissions()getInfo()getRadioInfo()getNetworkType(...)- Interfaces
- Type Aliases
- Enums
checkPermissions()
checkPermissions() => Promise<PermissionStatus>Check current permission status for phone state.
Returns: Promise<PermissionStatus>
requestPermissions()
requestPermissions() => Promise<PermissionStatus>Request phone state permissions from the user.
Returns: Promise<PermissionStatus>
getInfo()
getInfo() => Promise<TelephonyInfo>Returns basic telephony info: signal level, operator name, data state. Available on Android only.
Returns: Promise<TelephonyInfo>
getRadioInfo()
getRadioInfo() => Promise<TelephonyRadioInfo>Returns extended radio information: raw signal metrics (RSRP, RSRQ, SINR, RSSI), VoLTE/VoNR availability, and IP version. Requires READ_PHONE_STATE permission on Android. Not available on iOS (Apple platform restriction).
Returns: Promise<TelephonyRadioInfo>
getNetworkType(...)
getNetworkType(options?: { withBasicPermission?: boolean | undefined; } | undefined) => Promise<{ type: TelephonyNetworkType; }>Returns the current data network type (2G, 3G, LTE, 5G). Available on Android only.
| Param | Type |
| ------------- | ----------------------------------------------- |
| options | { withBasicPermission?: boolean; } |
Returns: Promise<{ type: TelephonyNetworkType; }>
Interfaces
PermissionStatus
| Prop | Type |
| ----------------- | ----------------------------------------------------------- |
| phone_state | PermissionState |
| location | PermissionState |
TelephonyInfo
| Prop | Type | Description |
| ------------------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| dataState | TelephonyDataState | |
| signalStrengthLevel | TelephonySignalStrengthLevel | |
| simOperatorName | string | |
| mcc | string | null | Mobile Country Code (3 digits, e.g. "208" for France). null if SIM is absent or operator string is unavailable. |
| mnc | string | null | Mobile Network Code (2–3 digits, e.g. "01" for Orange France). null if SIM is absent or operator string is unavailable. |
TelephonyRadioInfo
| Prop | Type | Description |
| ------------------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| signalStrengthLevel | TelephonySignalStrengthLevel | Qualitative signal level (NONE / POOR / MODERATE / GOOD / GREAT). |
| rsrp | number | null | Reference Signal Received Power in dBm (LTE/NR). Typical range: -44 (excellent) to -140 (no signal). null if unavailable or unsupported. |
| rsrq | number | null | Reference Signal Received Quality in dB (LTE/NR). Typical range: -3 (excellent) to -20 (poor). null if unavailable or unsupported. |
| sinr | number | null | Signal-to-Interference-plus-Noise Ratio in dB (LTE/NR). Typical range: +30 (excellent) to -20 (poor). null if unavailable or unsupported. |
| rssi | number | null | Received Signal Strength Indicator in dBm (WCDMA/3G or LTE). Typical range: -50 (excellent) to -100 (poor). null if unavailable or unsupported. |
| cqi | number | null | Channel Quality Indicator (LTE only, 0–15). null if unavailable or unsupported. |
| isVoLteAvailable | boolean | null | Whether VoLTE (Voice over LTE) is supported by the device and network. Android 12+ only. null on older versions and iOS. |
| isNrAvailable | boolean | null | Whether VoNR / 5G NR is supported by the device and network. Android 12+ only. null on older versions and iOS. |
| ipVersion | TelephonyIpVersion | Detected IP version: "IPv4", "IPv6", "dual", or "unknown". |
Type Aliases
PermissionState
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'
Enums
TelephonyDataState
| Members | Value |
| -------------------------- | ----------------------------------- |
| UNKNOWN | "UNKNOWN" |
| DISCONNECTED | "DISCONNECTED" |
| CONNECTING | "CONNECTING" |
| CONNECTED | "CONNECTED" |
| SUSPENDED | "SUSPENDED" |
| DISCONNECTING | "DISCONNECTING" |
| HANDOVER_IN_PROGRESS | "HANDOVER_IN_PROGRESS" |
TelephonySignalStrengthLevel
| Members | Value |
| -------------- | ----------------------- |
| UNKNOWN | "UNKNOWN" |
| NONE | "NONE" |
| POOR | "POOR" |
| MODERATE | "MODERATE" |
| GOOD | "GOOD" |
| GREAT | "GREAT" |
TelephonyIpVersion
| Members | Value |
| ------------- | ---------------------- |
| UNKNOWN | "unknown" |
| IPV4 | "IPv4" |
| IPV6 | "IPv6" |
| DUAL | "dual" |
TelephonyNetworkType
| Members | Value |
| ------------- | ---------------------- |
| UNKNOWN | "UNKNOWN" |
| TWO_G | "2G" |
| THREE_G | "3G" |
| LTE | "LTE" |
| FIVE_G | "5G" |
