rns-nativecall 1.2.4 → 1.2.5

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
@@ -130,20 +130,32 @@ export default function App() {
130
130
  ### 📖 API Reference
131
131
  # rns-nativecall API Reference
132
132
 
133
+ ## API Reference
134
+
135
+ ### Core Methods
133
136
  | Method | Platform | Description |
134
137
  | :--- | :--- | :--- |
135
138
  | **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. |
139
+ | **displayCall(uuid, name, type)** | All | Launches full-screen Activity (Android) or reports to CallKit (iOS). |
140
+ | **destroyNativeCallUI(uuid)** | All | Stops ringtone/Activity (Android) or ends CallKit session (iOS). |
141
+ | **showMissedCall(uuid, name, type)** | Android | Posts a persistent notification in the device tray for missed calls. |
142
+ | **subscribe(onAccept, onReject, onFailed)** | All | Listens for Answer/Decline actions and system-level bridge errors. |
143
+
144
+ ### Data & State Management
145
+ | Method | Platform | Description |
146
+ | :--- | :--- | :--- |
147
+ | **getInitialCallData()** | All | Retrieves the call payload if the app was cold-started via a notification. |
148
+ | **checkCallValidity(uuid)** | All | Returns `{isValid, isCanceled}` to prevent ghost or aborted calls. |
149
+ | **checkCallStatus(uuid)** | All | Returns `{isCanceled, isActive, shouldDisplay}` for UI syncing. |
150
+
151
+ ### Android Permissions
152
+ | Method | Platform | Description |
153
+ | :--- | :--- | :--- |
154
+ | **checkOverlayPermission()** | Android | Returns `true` if app can draw over other apps (Heads-up UI). |
155
+ | **checkFullScreenPermission()** | Android | (Android 14+) Checks if app can trigger full-screen intents. |
156
+ | **requestOverlayPermission()** | Android | Navigates user to "Draw over other apps" system settings. |
157
+ | **requestFullScreenSettings()** | Android | (Android 14+) Navigates user to "Full Screen Intent" settings. |
158
+
147
159
  ---
148
160
 
149
161
  # 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.5",
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",