rns-nativecall 0.1.1 → 0.1.3

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
@@ -6,6 +6,7 @@ import android.net.Uri
6
6
  import android.os.Bundle
7
7
  import android.telecom.PhoneAccountHandle
8
8
  import android.telecom.TelecomManager
9
+ import android.telecom.VideoProfile // <-- ADD THIS IMPORT
9
10
 
10
11
  object NativeCallManager {
11
12
 
@@ -26,9 +27,15 @@ object NativeCallManager {
26
27
  Uri.fromParts("sip", handle, null)
27
28
  )
28
29
  putString("EXTRA_CALL_UUID", uuid)
29
- putString("EXTRA_CALL_SUBJECT", name)
30
+ putString(TelecomManager.EXTRA_CALL_SUBJECT, name)
30
31
  putBoolean("EXTRA_PLAY_RING", playRing)
31
- putBoolean("EXTRA_START_CALL_WITH_VIDEO_STATE", hasVideo)
32
+
33
+ // Video state requires specific integer constants
34
+ val videoState =
35
+ if (hasVideo) VideoProfile.STATE_BIDIRECTIONAL
36
+ else VideoProfile.STATE_AUDIO_ONLY
37
+
38
+ putInt(TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE, videoState)
32
39
  }
33
40
 
34
41
  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.3",
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",