@qusaieilouti99/call-manager 0.1.3 → 0.1.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.
@@ -12,7 +12,10 @@ import android.telecom.TelecomManager
12
12
  import android.util.Log
13
13
  import com.facebook.react.bridge.*
14
14
  import com.facebook.react.turbomodule.core.interfaces.TurboModule
15
+ import com.facebook.react.bridge.ReactApplicationContext
16
+ import com.facebook.react.module.annotations.ReactModule
15
17
 
18
+ @ReactModule(name = CallManagerModule.NAME)
16
19
  class CallManagerModule(reactContext: ReactApplicationContext) :
17
20
  NativeCallManagerSpec(reactContext), TurboModule {
18
21
 
@@ -39,6 +42,7 @@ class CallManagerModule(reactContext: ReactApplicationContext) :
39
42
 
40
43
  // 1. Report incoming call
41
44
  override fun reportIncomingCall(callId: String, callData: String) {
45
+ Log.d(TAG, "reportIncomingCall called with callId=$callId, callData=$callData")
42
46
  val context = reactApplicationContext
43
47
  val telecomManager = context.getSystemService(Context.TELECOM_SERVICE) as TelecomManager
44
48
 
@@ -23,6 +23,7 @@ class CallNotificationHelper(private val context: Context) {
23
23
  private var ringtone: android.media.Ringtone? = null
24
24
 
25
25
  fun showIncomingCallNotification(callId: String, callerName: String) {
26
+ Log.d("CallNotificationHelper", "Showing incoming call notification for $callerName, callId=$callId")
26
27
  createNotificationChannel()
27
28
 
28
29
  // Intent for answer action
@@ -66,6 +67,7 @@ class CallNotificationHelper(private val context: Context) {
66
67
  declinePendingIntent
67
68
  )
68
69
  )
70
+ .setFullScreenIntent(fullScreenPendingIntent, true) // <-- set separately
69
71
  .setOngoing(true)
70
72
  .setAutoCancel(false)
71
73
  .build()
@@ -121,6 +123,7 @@ class CallNotificationHelper(private val context: Context) {
121
123
 
122
124
  private fun playRingtone() {
123
125
  try {
126
+ Log.d("CallNotificationHelper", "Playing ringtone")
124
127
  val uri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE)
125
128
  ringtone = RingtoneManager.getRingtone(context, uri)
126
129
  ringtone?.audioAttributes = AudioAttributes.Builder()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qusaieilouti99/call-manager",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "call manager",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",