@qusaieilouti99/call-manager 0.1.149 → 0.1.150

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.
@@ -78,9 +78,6 @@ object CallEngine {
78
78
  private val telecomConnections = ConcurrentHashMap<String, Connection>()
79
79
  private val callMetadata = ConcurrentHashMap<String, String>()
80
80
 
81
- // NEW: Track incoming calls to prevent duplicates
82
- private val incomingCallIds = ConcurrentHashMap<String, Long>()
83
-
84
81
  private var currentCallId: String? = null
85
82
  private var canMakeMultipleCalls: Boolean = false
86
83
  private var lastAudioRoutesInfo: AudioRoutesInfo? = null
@@ -89,10 +86,6 @@ object CallEngine {
89
86
  private var eventHandler: ((CallEventType, String) -> Unit)? = null
90
87
  private val cachedEvents = mutableListOf<Pair<CallEventType, String>>()
91
88
 
92
- // NEW: Track ringtone state to prevent double ringing
93
- private var isCustomRingtoneActive = false
94
- private val ringtoneStateLock = Any()
95
-
96
89
  interface LockScreenBypassCallback {
97
90
  fun onLockScreenBypassChanged(shouldBypass: Boolean)
98
91
  }
@@ -245,19 +238,6 @@ object CallEngine {
245
238
  initialize(context)
246
239
  }
247
240
 
248
- // NEW: Guard against duplicate calls
249
- val currentTime = System.currentTimeMillis()
250
- val lastCallTime = incomingCallIds[callId]
251
- if (lastCallTime != null && (currentTime - lastCallTime) < 5000) {
252
- Log.w(TAG, "Ignoring duplicate incoming call for callId: $callId (last call ${currentTime - lastCallTime}ms ago)")
253
- return
254
- }
255
- incomingCallIds[callId] = currentTime
256
-
257
- // Clean up old entries (older than 30 seconds)
258
- val cutoffTime = currentTime - 30000
259
- incomingCallIds.entries.removeAll { it.value < cutoffTime }
260
-
261
241
  Log.d(TAG, "reportIncomingCall: callId=$callId, type=$callType, name=$displayName")
262
242
  metadata?.let { callMetadata[callId] = it }
263
243
 
@@ -421,7 +401,7 @@ object CallEngine {
421
401
 
422
402
  // NEW: Improved initial audio route setting with better timing
423
403
  mainHandler.postDelayed({
424
- setInitialAudioRoute(callType, isCallStart = true)
404
+ setInitialAudioRoute(callType)
425
405
  }, 500L)
426
406
 
427
407
  updateLockScreenBypass()
@@ -468,21 +448,8 @@ object CallEngine {
468
448
  updateLockScreenBypass()
469
449
 
470
450
  setAudioMode()
471
-
472
- // NEW: Improved initial audio route with longer delay and retry mechanism
473
451
  mainHandler.postDelayed({
474
- setInitialAudioRoute(callInfo.callType, isCallStart = true)
475
-
476
- // Retry after additional delay if needed for video calls
477
- if (callInfo.callType == "Video") {
478
- mainHandler.postDelayed({
479
- val currentRoute = getCurrentAudioRoute()
480
- if (currentRoute != "Speaker") {
481
- Log.d(TAG, "Retrying audio route for video call - current: $currentRoute")
482
- setAudioRoute("Speaker")
483
- }
484
- }, 1000L)
485
- }
452
+ setInitialAudioRoute(callInfo.callType)
486
453
  }, 800L)
487
454
 
488
455
  if (isLocalAnswer) {
@@ -641,7 +608,6 @@ object CallEngine {
641
608
  activeCalls.clear()
642
609
  telecomConnections.clear()
643
610
  callMetadata.clear()
644
- incomingCallIds.clear() // NEW: Clear duplicate tracking
645
611
  currentCallId = null
646
612
 
647
613
  cleanup()
@@ -658,7 +624,6 @@ object CallEngine {
658
624
 
659
625
  val metadata = callMetadata.remove(callId)
660
626
  activeCalls.remove(callId)
661
- incomingCallIds.remove(callId) // NEW: Clean up duplicate tracking
662
627
 
663
628
  stopRingback()
664
629
  stopRingtone()
@@ -815,45 +780,18 @@ object CallEngine {
815
780
  }
816
781
  }
817
782
 
818
- // NEW: Improved initial audio route setting
819
- private fun setInitialAudioRoute(callType: String, isCallStart: Boolean = false) {
783
+ private fun setInitialAudioRoute(callType: String) {
820
784
  val avail = getAudioDevices()
821
785
  // Extract string values for comparison
822
786
  val deviceStrings = avail.devices.map { it.value }
823
-
824
787
  val defaultRoute = when {
825
788
  deviceStrings.contains("Bluetooth") -> "Bluetooth"
826
789
  deviceStrings.contains("Headset") -> "Headset"
827
790
  callType == "Video" -> "Speaker"
828
791
  else -> "Earpiece"
829
792
  }
830
-
831
- Log.d(TAG, "Setting initial audio route: $defaultRoute for call type: $callType (isCallStart: $isCallStart)")
832
-
833
- // For call start, ensure audio mode is properly set first
834
- if (isCallStart) {
835
- setAudioMode()
836
-
837
- // Additional delay for audio system to be ready
838
- if (callType == "Video") {
839
- mainHandler.postDelayed({
840
- setAudioRoute(defaultRoute)
841
-
842
- // Force speaker for video calls with additional verification
843
- mainHandler.postDelayed({
844
- val currentRoute = getCurrentAudioRoute()
845
- if (currentRoute != "Speaker" && !deviceStrings.contains("Bluetooth") && !deviceStrings.contains("Headset")) {
846
- Log.d(TAG, "Forcing speaker for video call - current route was: $currentRoute")
847
- setAudioRoute("Speaker")
848
- }
849
- }, 300L)
850
- }, 200L)
851
- } else {
852
- setAudioRoute(defaultRoute)
853
- }
854
- } else {
855
- setAudioRoute(defaultRoute)
856
- }
793
+ Log.d(TAG, "Setting initial audio route: $defaultRoute for call type: $callType")
794
+ setAudioRoute(defaultRoute)
857
795
  }
858
796
 
859
797
  private fun setAudioMode() {
@@ -958,7 +896,6 @@ object CallEngine {
958
896
 
959
897
  private fun rejectIncomingCallCollision(callId: String, reason: String) {
960
898
  callMetadata.remove(callId)
961
- incomingCallIds.remove(callId) // NEW: Clean up duplicate tracking
962
899
  emitEvent(CallEventType.CALL_REJECTED, JSONObject().apply {
963
900
  put("callId", callId)
964
901
  put("reason", reason)
@@ -1013,8 +950,6 @@ object CallEngine {
1013
950
  Log.d(TAG, "Device is unlocked and supports CallStyle - using enhanced notification")
1014
951
  showStandardNotification(context, callId, callerName, callType, callerPicUrl)
1015
952
  }
1016
-
1017
- // NEW: Improved ringtone handling to prevent double ringing
1018
953
  playRingtone()
1019
954
  }
1020
955
 
@@ -1258,73 +1193,43 @@ object CallEngine {
1258
1193
  )
1259
1194
  }
1260
1195
 
1261
- // NEW: Improved ringtone handling to prevent double ringing
1262
1196
  private fun playRingtone() {
1263
- synchronized(ringtoneStateLock) {
1264
- if (isCustomRingtoneActive) {
1265
- Log.d(TAG, "Custom ringtone already active, skipping")
1266
- return
1267
- }
1268
-
1269
- val context = requireContext()
1270
- audioManager = audioManager ?: context.getSystemService(Context.AUDIO_SERVICE) as AudioManager
1271
-
1272
- // Only set ringtone mode if not already in communication mode
1273
- val currentMode = audioManager?.mode ?: AudioManager.MODE_NORMAL
1274
- if (currentMode != AudioManager.MODE_IN_COMMUNICATION) {
1275
- audioManager?.mode = AudioManager.MODE_RINGTONE
1276
- }
1197
+ val context = requireContext()
1198
+ audioManager = audioManager ?: context.getSystemService(Context.AUDIO_SERVICE) as AudioManager
1199
+ audioManager?.mode = AudioManager.MODE_RINGTONE
1277
1200
 
1278
- vibrator = context.getSystemService(Context.VIBRATOR_SERVICE) as? Vibrator
1279
- vibrator?.let { v ->
1280
- val pattern = longArrayOf(0L, 500L, 500L)
1281
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
1282
- v.vibrate(VibrationEffect.createWaveform(pattern, 0))
1283
- } else {
1284
- @Suppress("DEPRECATION")
1285
- v.vibrate(pattern, 0)
1286
- }
1201
+ vibrator = context.getSystemService(Context.VIBRATOR_SERVICE) as? Vibrator
1202
+ vibrator?.let { v ->
1203
+ val pattern = longArrayOf(0L, 500L, 500L)
1204
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
1205
+ v.vibrate(VibrationEffect.createWaveform(pattern, 0))
1206
+ } else {
1207
+ @Suppress("DEPRECATION")
1208
+ v.vibrate(pattern, 0)
1287
1209
  }
1210
+ }
1288
1211
 
1289
- try {
1290
- // Check if system ringtone is already playing for this call (API 31+)
1291
- val shouldPlayCustomRingtone = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
1292
- // For newer APIs, be more cautious about playing custom ringtone
1293
- // if CallStyle notification is being used
1294
- !supportsCallStyleNotifications()
1295
- } else {
1296
- true
1297
- }
1298
-
1299
- if (shouldPlayCustomRingtone) {
1300
- val uri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE)
1301
- ringtone = RingtoneManager.getRingtone(context, uri)
1302
- ringtone?.play()
1303
- isCustomRingtoneActive = true
1304
- Log.d(TAG, "Custom ringtone started playing")
1305
- } else {
1306
- Log.d(TAG, "Skipping custom ringtone - system should handle it")
1307
- }
1308
- } catch (e: Exception) {
1309
- Log.e(TAG, "Failed to play ringtone", e)
1310
- }
1212
+ try {
1213
+ val uri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE)
1214
+ ringtone = RingtoneManager.getRingtone(context, uri)
1215
+ ringtone?.play()
1216
+ Log.d(TAG, "Ringtone started playing")
1217
+ } catch (e: Exception) {
1218
+ Log.e(TAG, "Failed to play ringtone", e)
1311
1219
  }
1312
1220
  }
1313
1221
 
1314
1222
  fun stopRingtone() {
1315
- synchronized(ringtoneStateLock) {
1316
- try {
1317
- ringtone?.stop()
1318
- isCustomRingtoneActive = false
1319
- Log.d(TAG, "Ringtone stopped")
1320
- } catch (e: Exception) {
1321
- Log.e(TAG, "Error stopping ringtone", e)
1322
- }
1323
- ringtone = null
1324
-
1325
- vibrator?.cancel()
1326
- vibrator = null
1223
+ try {
1224
+ ringtone?.stop()
1225
+ Log.d(TAG, "Ringtone stopped")
1226
+ } catch (e: Exception) {
1227
+ Log.e(TAG, "Error stopping ringtone", e)
1327
1228
  }
1229
+ ringtone = null
1230
+
1231
+ vibrator?.cancel()
1232
+ vibrator = null
1328
1233
  }
1329
1234
 
1330
1235
  private fun startRingback() {
@@ -1360,9 +1265,6 @@ object CallEngine {
1360
1265
  stopForegroundService()
1361
1266
  keepScreenAwake(false)
1362
1267
  resetAudioMode()
1363
- synchronized(ringtoneStateLock) {
1364
- isCustomRingtoneActive = false
1365
- }
1366
1268
  }
1367
1269
 
1368
1270
  fun onApplicationTerminate() {
@@ -1376,7 +1278,6 @@ object CallEngine {
1376
1278
  activeCalls.clear()
1377
1279
  telecomConnections.clear()
1378
1280
  callMetadata.clear()
1379
- incomingCallIds.clear() // NEW: Clear duplicate tracking
1380
1281
  currentCallId = null
1381
1282
  cleanup()
1382
1283
  lockScreenBypassCallbacks.clear()
@@ -1 +1 @@
1
- {"version":3,"names":["NitroModules","CallManagerHybridObject","createHybridObject"],"sourceRoot":"../../src","sources":["CallManager.nitro.ts"],"mappings":";;AAAA;AACA,SAA4BA,YAAY,QAAQ,4BAA4B;;AAI5E;;AAKA;;AA2CA,OAAO,MAAMC,uBAAuB,GAClCD,YAAY,CAACE,kBAAkB,CAAc,aAAa,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["NitroModules","CallManagerHybridObject","createHybridObject"],"sourceRoot":"../../src","sources":["CallManager.nitro.ts"],"mappings":";;AAAA;AACA,SAA4BA,YAAY,QAAQ,4BAA4B;;AAG5E;;AAKA;;AAyDA,OAAO,MAAMC,uBAAuB,GAClCD,YAAY,CAACE,kBAAkB,CAAc,aAAa,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"CallManager.nitro.d.ts","sourceRoot":"","sources":["../../../src/CallManager.nitro.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAgB,MAAM,4BAA4B,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIrD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAY,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;IAEpF,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,eAAe,IAAI,IAAI,CAAC;IACxB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAGnC,eAAe,IAAI,eAAe,CAAC;IACnC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,C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,CAET,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GACxD,MAAM,IAAI,CAAC;IAEd,yBAAyB,CAEvB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAClC,MAAM,IAAI,CAAC;IAEd,aAAa,IAAI,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,uBAAuB,aACyB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qusaieilouti99/call-manager",
3
- "version": "0.1.149",
3
+ "version": "0.1.150",
4
4
  "description": "Call manager",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -62,29 +62,35 @@
62
62
  "registry": "https://registry.npmjs.org/"
63
63
  },
64
64
  "devDependencies": {
65
- "@commitlint/config-conventional": "^19.8.1",
66
- "@eslint/compat": "^1.3.1",
67
- "@eslint/eslintrc": "^1.4.1",
68
- "@eslint/js": "^10.0.0",
69
- "@evilmartians/lefthook": "^1.12.2",
65
+ "@commitlint/config-conventional": "^19.6.0",
66
+ "@eslint/compat": "^1.2.7",
67
+ "@eslint/eslintrc": "^3.3.0",
68
+ "@eslint/js": "^9.22.0",
69
+ "@evilmartians/lefthook": "^1.5.0",
70
70
  "@react-native/babel-preset": "0.79.2",
71
- "@react-native/eslint-config": "^0.79.2",
71
+ "@react-native/eslint-config": "^0.78.0",
72
+ "@release-it/conventional-changelog": "^9.0.2",
72
73
  "@types/jest": "^29.5.5",
73
74
  "@types/react": "^19.0.0",
74
- "commitlint": "^19.8.1",
75
+ "@typescript-eslint/eslint-plugin": "^8.39.0",
76
+ "commitlint": "^19.6.1",
75
77
  "del-cli": "^5.1.0",
76
- "eslint": "^9.32.0",
77
- "eslint-config-prettier": "^10.1.8",
78
- "eslint-plugin-prettier": "^5.5.3",
78
+ "eslint": "^9.22.0",
79
+ "eslint-config-prettier": "^10.1.1",
80
+ "eslint-plugin-ft-flow": "^3.0.11",
81
+ "eslint-plugin-jest": "^29.0.1",
82
+ "eslint-plugin-prettier": "^5.2.3",
83
+ "eslint-plugin-react-hooks": "^5.2.0",
84
+ "eslint-plugin-react-native": "^5.0.0",
79
85
  "jest": "^29.7.0",
80
86
  "nitro-codegen": "*",
81
- "prettier": "^3.6.2",
87
+ "prettier": "^3.0.3",
82
88
  "react": "19.0.0",
83
89
  "react-native": "0.79.2",
84
- "react-native-builder-bob": "^0.40.13",
90
+ "react-native-builder-bob": "^0.40.8",
85
91
  "react-native-nitro-modules": "*",
86
- "release-it": "^19.0.4",
87
- "turbo": "^1.13.4",
92
+ "release-it": "^17.10.0",
93
+ "turbo": "^1.10.7",
88
94
  "typescript": "^5.9.2"
89
95
  },
90
96
  "peerDependencies": {
@@ -2,7 +2,6 @@
2
2
  import { type HybridObject, NitroModules } from 'react-native-nitro-modules';
3
3
  import type { CallEventType } from './CallEventType';
4
4
 
5
-
6
5
  // This is workaround for a swift compiler bug, its preventing us from using string[].
7
6
  export interface StringHolder {
8
7
  value: string;
@@ -14,7 +13,8 @@ export interface AudioRoutesInfo {
14
13
  currentRoute: string; // Currently active audio route (e.g., "Speaker", "Earpiece", "Bluetooth", "Headset", "Unknown")
15
14
  }
16
15
 
17
- export interface CallManager extends HybridObject<{ ios: 'swift'; android: 'kotlin' }> {
16
+ export interface CallManager
17
+ extends HybridObject<{ ios: 'swift'; android: 'kotlin' }> {
18
18
  // Call control
19
19
  endCall(callId: string): void;
20
20
  silenceRingtone(): void;
@@ -26,14 +26,29 @@ export interface CallManager extends HybridObject<{ ios: 'swift'; android: 'kotl
26
26
  keepScreenAwake(keepAwake: boolean): void;
27
27
 
28
28
  endAllCalls(): void;
29
- startOutgoingCall(callId: string, callType: string, targetName: string, metadata?: string): void;
30
- startCall(callId: string, callType: string, targetName: string, metadata?: string): void;
29
+ startOutgoingCall(
30
+ callId: string,
31
+ callType: string,
32
+ targetName: string,
33
+ metadata?: string
34
+ ): void;
35
+ startCall(
36
+ callId: string,
37
+ callType: string,
38
+ targetName: string,
39
+ metadata?: string
40
+ ): void;
31
41
  setOnHold(callId: string, onHold: boolean): void;
32
42
  setMuted(callId: string, muted: boolean): void;
33
43
  updateDisplayCallInformation(callId: string, callerName: string): void;
34
44
 
35
45
  // added just new
36
- reportIncomingCall(callId: string, callType: string, targetName: string, metadata?: string): void;
46
+ reportIncomingCall(
47
+ callId: string,
48
+ callType: string,
49
+ targetName: string,
50
+ metadata?: string
51
+ ): void;
37
52
 
38
53
  // Event emitter: addListener returns a remove function
39
54
  addListener(
@@ -46,10 +61,8 @@ export interface CallManager extends HybridObject<{ ios: 'swift'; android: 'kotl
46
61
  listener: (payload: string) => void
47
62
  ): () => void;
48
63
 
49
-
50
- hasActiveCall() :boolean; // if there is an active call, no matter ringing, incoming, outgoing, whatever
64
+ hasActiveCall(): boolean; // if there is an active call, no matter ringing, incoming, outgoing, whatever
51
65
  }
52
66
 
53
-
54
67
  export const CallManagerHybridObject =
55
68
  NitroModules.createHybridObject<CallManager>('CallManager');