rns-nativecall 0.1.1 → 0.1.2

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.
@@ -50,4 +50,5 @@ dependencies {
50
50
 
51
51
  // Note: Telecom APIs (ConnectionService) are part of the standard Android SDK,
52
52
  // so no extra external dependencies are needed for them.
53
+ implementation "com.google.firebase:firebase-messaging:23.4.0"
53
54
  }
@@ -1,3 +1,5 @@
1
+ ///
2
+ // Users/bush/Desktop/Packages/rns-nativecall/android/src/main/java/com/rnsnativecall/CallMessagingService.kt
1
3
  package com.rnsnativecall
2
4
 
3
5
  import com.google.firebase.messaging.FirebaseMessagingService
@@ -1,3 +1,5 @@
1
+ ///
2
+ // Users/bush/Desktop/Packages/rns-nativecall/android/src/main/java/com/rnsnativecall/NativeCallManager.kt
1
3
  package com.rnsnativecall
2
4
 
3
5
  import android.content.ComponentName
@@ -19,6 +21,7 @@ object NativeCallManager {
19
21
  val telecomManager = context.getSystemService(Context.TELECOM_SERVICE) as TelecomManager
20
22
  val phoneAccountHandle = getPhoneAccountHandle(context)
21
23
 
24
+ // In NativeCallManager.kt
22
25
  val extras =
23
26
  Bundle().apply {
24
27
  putParcelable(
@@ -26,9 +29,17 @@ object NativeCallManager {
26
29
  Uri.fromParts("sip", handle, null)
27
30
  )
28
31
  putString("EXTRA_CALL_UUID", uuid)
29
- putString("EXTRA_CALL_SUBJECT", name)
32
+ putString(
33
+ TelecomManager.EXTRA_CALL_SUBJECT,
34
+ name
35
+ ) // Use system constant for name
30
36
  putBoolean("EXTRA_PLAY_RING", playRing)
31
- putBoolean("EXTRA_START_CALL_WITH_VIDEO_STATE", hasVideo)
37
+
38
+ // IMPORTANT: Android uses specific integers for video state, not just a boolean
39
+ val videoState =
40
+ if (hasVideo) VideoProfile.STATE_BIDIRECTIONAL
41
+ else VideoProfile.STATE_AUDIO_ONLY
42
+ putInt(TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE, videoState)
32
43
  }
33
44
 
34
45
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rns-nativecall",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "RNS nativecall component with native Android/iOS for handling native call ui, when app is not open or open.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",