rns-nativecall 1.1.3 → 1.1.4

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.
@@ -118,6 +118,14 @@ object NativeCallManager {
118
118
  }
119
119
  }
120
120
 
121
+ fun refreshNotificationOnly(
122
+ context: Context,
123
+ uuid: String,
124
+ ) {
125
+ val manager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
126
+ manager.cancel(uuid.hashCode())
127
+ }
128
+
121
129
  fun dismissIncomingCall(
122
130
  context: Context,
123
131
  uuid: String?,
@@ -12,15 +12,10 @@ class UnlockReceiver : BroadcastReceiver() {
12
12
  ) {
13
13
  if (intent.action == Intent.ACTION_USER_PRESENT) {
14
14
  val activeData = NativeCallManager.getCurrentCallData()
15
-
16
15
  if (activeData != null) {
17
- // IMPORTANT: Ensure the notification channel used here
18
- // has "Importance: High" to force the Heads-Up display.
16
+ val uuid = activeData["callUuid"] ?: "" // Use map access [] instead of getString
17
+ NativeCallManager.refreshNotificationOnly(context, uuid)
19
18
  NativeCallManager.handleIncomingPush(context, activeData)
20
-
21
- // Optional: If you want to force the React Native app to open
22
- // immediately upon unlock without the user touching the banner:
23
- // NativeCallManager.launchApp(context)
24
19
  }
25
20
  }
26
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rns-nativecall",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
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",