rns-nativecall 1.2.4 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -127,23 +127,33 @@ export default function App() {
127
127
  }
128
128
  ```
129
129
  ---
130
- ### 📖 API Reference
131
- # rns-nativecall API Reference
130
+ ## 📖 rns-nativecall API Reference
132
131
 
132
+
133
+ ### Core Methods
133
134
  | Method | Platform | Description |
134
135
  | :--- | :--- | :--- |
135
136
  | **registerHeadlessTask(callback)** | All | Registers the background task. `eventType` is 'INCOMING_CALL', 'BUSY', or 'ABORTED_CALL'. |
136
- | **displayCall(uuid, name, type)** | All | Launches full-screen Activity. iOS: Reports incoming call to CallKit. |
137
- | **checkCallValidity(uuid)** | All | Returns {isValid, isCanceled} to prevent ghost/canceled calls. |
138
- | **checkCallStatus(uuid)** | All | Returns {isCanceled, isActive, shouldDisplay} for UI syncing. |
139
- | **showMissedCall(uuid, name, type)** | All | Shows miss call on the deivce notification tray|
140
- | **destroyNativeCallUI(uuid)** | All | Stops ringtone/Activity. iOS: Ends CallKit (Handoff vs Hangup logic). |
141
- | **getInitialCallData()** | All | Retrieves the call payload if the app was cold-started via a notification Answer. |
142
- | **subscribe(onAccept, onReject, onFailed)** | All | Listens for Answer/Decline button presses and system-level bridge errors. |
143
- | **checkOverlayPermission()** | Android | Android only: Returns true if app can draw over other apps while unlocked. |
144
- | **checkFullScreenPermission()** | Android | Android 14+: Checks if app can trigger full-screen intents on lockscreen. |
145
- | **requestOverlayPermission()** | Android | Android only: Navigates user to "Draw over other apps" system settings. |
146
- | **requestFullScreenSettings()** | Android | Android 14+: Navigates user to "Full Screen Intent" system settings. |
137
+ | **displayCall(uuid, name, type)** | All | Launches full-screen Activity (Android) or reports to CallKit (iOS). |
138
+ | **destroyNativeCallUI(uuid)** | All | Stops ringtone/Activity (Android) or ends CallKit session (iOS). |
139
+ | **subscribe(onAccept, onReject, onFailed)** | All | Listens for Answer/Decline actions and system-level bridge errors. |
140
+ | **showMissedCall(uuid, name, type)** | Android | Posts a persistent notification in the device tray for missed calls. |
141
+
142
+ ### Data & State Management
143
+ | Method | Platform | Description |
144
+ | :--- | :--- | :--- |
145
+ | **getInitialCallData()** | All | Retrieves the call payload if the app was cold-started via a notification. |
146
+ | **checkCallValidity(uuid)** | All | Returns `{isValid, isCanceled}` to prevent ghost or aborted calls. |
147
+ | **checkCallStatus(uuid)** | All | Returns `{isCanceled, isActive, shouldDisplay}` for UI syncing. |
148
+
149
+ ### Android Permissions
150
+ | Method | Platform | Description |
151
+ | :--- | :--- | :--- |
152
+ | **checkOverlayPermission()** | Android | Returns `true` if app can draw over other apps (Heads-up UI). |
153
+ | **checkFullScreenPermission()** | Android | (Android 14+) Checks if app can trigger full-screen intents. |
154
+ | **requestOverlayPermission()** | Android | Navigates user to "Draw over other apps" system settings. |
155
+ | **requestFullScreenSettings()** | Android | (Android 14+) Navigates user to "Full Screen Intent" settings. |
156
+
147
157
  ---
148
158
 
149
159
  # Implementation Notes
package/index.d.ts CHANGED
@@ -63,7 +63,7 @@ export interface CallHandlerType {
63
63
  ): Promise<boolean>;
64
64
 
65
65
  /**
66
- * Show showMissedCall on the device tray.
66
+ * Show showMissedCall on the device notification tray.
67
67
  */
68
68
  showMissedCall(
69
69
  uuid: string,
package/index.js CHANGED
@@ -78,11 +78,6 @@ export const CallHandler = {
78
78
  return await CallModule.checkCallStatus(uuid.toLowerCase().trim());
79
79
  },
80
80
 
81
- showMissedCall: async (uuid, name, callType) => {
82
- if (!CallModule?.showMissedCall) return false;
83
- return await CallModule.showMissedCall(uuid.toLowerCase().trim(), name, callType);
84
- },
85
-
86
81
  //--------------------------------------------------------------------------------------
87
82
 
88
83
  requestOverlayPermission: async () => {
@@ -97,6 +92,12 @@ export const CallHandler = {
97
92
  return await CallModule.requestFullScreenSettings();
98
93
  },
99
94
 
95
+ showMissedCall: async (uuid, name, callType) => {
96
+ if (Platform.OS === 'ios') return true;
97
+ if (!CallModule?.showMissedCall) return false;
98
+ return await CallModule.showMissedCall(uuid.toLowerCase().trim(), name, callType);
99
+ },
100
+
100
101
  checkOverlayPermission: async () => {
101
102
  if (Platform.OS === 'ios') return true;
102
103
  if (!CallModule?.checkOverlayPermission) return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rns-nativecall",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "High-performance React Native module for handling native VoIP call UI on Android and iOS.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",