rns-nativecall 0.1.2 → 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.
@@ -1,5 +1,3 @@
1
- ///
2
- // Users/bush/Desktop/Packages/rns-nativecall/android/src/main/java/com/rnsnativecall/NativeCallManager.kt
3
1
  package com.rnsnativecall
4
2
 
5
3
  import android.content.ComponentName
@@ -8,6 +6,7 @@ import android.net.Uri
8
6
  import android.os.Bundle
9
7
  import android.telecom.PhoneAccountHandle
10
8
  import android.telecom.TelecomManager
9
+ import android.telecom.VideoProfile // <-- ADD THIS IMPORT
11
10
 
12
11
  object NativeCallManager {
13
12
 
@@ -21,7 +20,6 @@ object NativeCallManager {
21
20
  val telecomManager = context.getSystemService(Context.TELECOM_SERVICE) as TelecomManager
22
21
  val phoneAccountHandle = getPhoneAccountHandle(context)
23
22
 
24
- // In NativeCallManager.kt
25
23
  val extras =
26
24
  Bundle().apply {
27
25
  putParcelable(
@@ -29,16 +27,14 @@ object NativeCallManager {
29
27
  Uri.fromParts("sip", handle, null)
30
28
  )
31
29
  putString("EXTRA_CALL_UUID", uuid)
32
- putString(
33
- TelecomManager.EXTRA_CALL_SUBJECT,
34
- name
35
- ) // Use system constant for name
30
+ putString(TelecomManager.EXTRA_CALL_SUBJECT, name)
36
31
  putBoolean("EXTRA_PLAY_RING", playRing)
37
32
 
38
- // IMPORTANT: Android uses specific integers for video state, not just a boolean
33
+ // Video state requires specific integer constants
39
34
  val videoState =
40
35
  if (hasVideo) VideoProfile.STATE_BIDIRECTIONAL
41
36
  else VideoProfile.STATE_AUDIO_ONLY
37
+
42
38
  putInt(TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE, videoState)
43
39
  }
44
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rns-nativecall",
3
- "version": "0.1.2",
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",