voice-react-native-sdk 1.6.2-fork.21 → 1.6.2-fork.23-hack
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.
- package/android/build.gradle +5 -1
- package/android/src/main/java/com/twiliovoicereactnative/ExpoModule.kt +1 -1
- package/android/src/main/java/com/twiliovoicereactnative/ExpoPackage.java +0 -15
- package/android/src/main/java/com/twiliovoicereactnative/NotificationUtility.java +10 -9
- package/package.json +8 -9
package/android/build.gradle
CHANGED
|
@@ -75,7 +75,11 @@ dependencies {
|
|
|
75
75
|
implementation "androidx.core:core:${versions.androidxCore}"
|
|
76
76
|
implementation "androidx.lifecycle:lifecycle-extensions:${versions.androidxLifecycle}"
|
|
77
77
|
implementation "com.google.firebase:firebase-messaging:${versions.firebaseMessaging}"
|
|
78
|
-
|
|
78
|
+
|
|
79
|
+
// October 2025: I had to use a fork of the audioswitch library so we are aligned with the LiveKit SDK which uses this forked version. Else I was getting build conflicts.
|
|
80
|
+
//implementation "com.twilio:audioswitch:${versions.audioSwitch}"
|
|
81
|
+
implementation 'com.github.davidliu:audioswitch:89582c47c9a04c62f90aa5e57251af4800a62c9a'
|
|
82
|
+
|
|
79
83
|
implementation 'com.google.android.material:material:1.1.0'
|
|
80
84
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"
|
|
81
85
|
implementation project(':expo-modules-core')
|
|
@@ -7,7 +7,7 @@ class ExpoModule : Module() {
|
|
|
7
7
|
private val log = SDKLog(this.javaClass)
|
|
8
8
|
|
|
9
9
|
override fun definition() = ModuleDefinition {
|
|
10
|
-
Name("
|
|
10
|
+
Name("TwilioVoiceExpo")
|
|
11
11
|
|
|
12
12
|
// For some reason I still need to have an empty module for things to work.
|
|
13
13
|
}
|
|
@@ -4,9 +4,6 @@ import android.content.Context;
|
|
|
4
4
|
import expo.modules.core.interfaces.Package;
|
|
5
5
|
import expo.modules.core.interfaces.ReactActivityLifecycleListener;
|
|
6
6
|
import expo.modules.core.interfaces.ApplicationLifecycleListener;
|
|
7
|
-
import expo.modules.core.interfaces.ReactNativeHostHandler;
|
|
8
|
-
import com.facebook.react.ReactNativeHost;
|
|
9
|
-
import com.facebook.react.ReactPackage;
|
|
10
7
|
import java.util.Collections;
|
|
11
8
|
import java.util.List;
|
|
12
9
|
|
|
@@ -20,16 +17,4 @@ public class ExpoPackage implements Package {
|
|
|
20
17
|
public List<? extends ApplicationLifecycleListener> createApplicationLifecycleListeners(Context applicationContext) {
|
|
21
18
|
return Collections.singletonList(new ExpoApplicationLifecycleListener());
|
|
22
19
|
}
|
|
23
|
-
|
|
24
|
-
/*
|
|
25
|
-
@Override
|
|
26
|
-
public List<? extends ReactNativeHostHandler> createReactNativeHostHandlers(Context context) {
|
|
27
|
-
return Collections.singletonList(new ReactNativeHostHandler() {
|
|
28
|
-
@Override
|
|
29
|
-
public ReactNativeHost createReactNativeHost(Context context) {
|
|
30
|
-
return new VoiceApplicationProxy.VoiceReactNativeHost((android.app.Application) context);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
*/
|
|
35
20
|
}
|
|
@@ -174,9 +174,10 @@ class NotificationUtility {
|
|
|
174
174
|
.addPerson(incomingCaller)
|
|
175
175
|
.setStyle(NotificationCompat.CallStyle.forIncomingCall(
|
|
176
176
|
incomingCaller, piRejectIntent, piAcceptIntent));
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
// Do not set full screen intent for CallStyle notifications on Android 14+.
|
|
178
|
+
// CallStyle.forIncomingCall() already provides the system call UI with answer/reject buttons
|
|
179
|
+
// that work properly even when the phone is locked. Setting a full screen intent interferes
|
|
180
|
+
// with the system call UI, preventing the answer/reject buttons from appearing.
|
|
180
181
|
return builder.build();
|
|
181
182
|
}
|
|
182
183
|
|
|
@@ -213,9 +214,9 @@ class NotificationUtility {
|
|
|
213
214
|
.setOngoing(true)
|
|
214
215
|
.addPerson(activeCaller)
|
|
215
216
|
.setStyle(NotificationCompat.CallStyle.forOngoingCall(activeCaller, piEndCallIntent));
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
// Do not set full screen intent for CallStyle notifications on Android 14+.
|
|
218
|
+
// CallStyle.forOngoingCall() provides the system call UI that works properly even when the phone is locked.
|
|
219
|
+
// Setting a full screen intent interferes with the system call UI.
|
|
219
220
|
return builder.build();
|
|
220
221
|
}
|
|
221
222
|
|
|
@@ -252,9 +253,9 @@ class NotificationUtility {
|
|
|
252
253
|
.setOngoing(true)
|
|
253
254
|
.addPerson(activeCaller)
|
|
254
255
|
.setStyle(NotificationCompat.CallStyle.forOngoingCall(activeCaller, piEndCallIntent));
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
// Do not set full screen intent for CallStyle notifications on Android 14+.
|
|
257
|
+
// CallStyle.forOngoingCall() provides the system call UI that works properly even when the phone is locked.
|
|
258
|
+
// Setting a full screen intent interferes with the system call UI.
|
|
258
259
|
return builder.build();
|
|
259
260
|
}
|
|
260
261
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "voice-react-native-sdk",
|
|
3
|
-
"version": "1.6.2-fork.
|
|
3
|
+
"version": "1.6.2-fork.23-hack",
|
|
4
4
|
"description": "Twilio Voice React Native SDK",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -58,15 +58,14 @@
|
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@babel/core": "^7.25.2",
|
|
61
|
-
"@babel/helper-function-name": "^7.24.7",
|
|
62
61
|
"@babel/preset-env": "7.23.8",
|
|
63
62
|
"@commitlint/config-conventional": "^11.0.0",
|
|
64
63
|
"@microsoft/api-extractor": "^7.25.2",
|
|
65
64
|
"@ngrok/ngrok": "^1.3.0",
|
|
66
65
|
"@react-native-community/eslint-config": "^2.0.0",
|
|
67
66
|
"@types/jest": "^28.1.6",
|
|
68
|
-
"@types/react": "~19.
|
|
69
|
-
"@types/react-native": "
|
|
67
|
+
"@types/react": "~19.0.10",
|
|
68
|
+
"@types/react-native": "0.62.13",
|
|
70
69
|
"api-documenter": "github:twilio/api-documenter#v0.0.1",
|
|
71
70
|
"axios": "^1.11.0",
|
|
72
71
|
"commitlint": "^11.0.0",
|
|
@@ -75,22 +74,22 @@
|
|
|
75
74
|
"eslint": "^7.2.0",
|
|
76
75
|
"eslint-config-prettier": "^7.0.0",
|
|
77
76
|
"eslint-plugin-prettier": "^3.1.3",
|
|
78
|
-
"expo": "~
|
|
77
|
+
"expo": "~53.0.22",
|
|
79
78
|
"express": "^4.19.2",
|
|
80
79
|
"husky": "^4.2.5",
|
|
81
80
|
"jest": "~29.7.0",
|
|
82
81
|
"metro-react-native-babel-preset": "0.76.8",
|
|
83
82
|
"pod-install": "^0.1.0",
|
|
84
83
|
"prettier": "^2.0.5",
|
|
85
|
-
"react": "19.
|
|
86
|
-
"react-native": "0.
|
|
84
|
+
"react": "19.0.0",
|
|
85
|
+
"react-native": "0.79.6",
|
|
87
86
|
"react-native-builder-bob": "^0.18.0",
|
|
88
87
|
"twilio": "^4.21.0",
|
|
89
88
|
"twilio-release-tool": "^1.0.2",
|
|
90
89
|
"typescript": "~5.9.2"
|
|
91
90
|
},
|
|
92
91
|
"peerDependencies": {
|
|
93
|
-
"expo": ">=
|
|
92
|
+
"expo": ">=53.0.0",
|
|
94
93
|
"react": "*",
|
|
95
94
|
"react-native": "*"
|
|
96
95
|
},
|
|
@@ -163,6 +162,6 @@
|
|
|
163
162
|
"dependencies": {
|
|
164
163
|
"@twilio/voice-errors": "1.8.0",
|
|
165
164
|
"eventemitter3": "^4.0.7",
|
|
166
|
-
"expo-modules-core": "^
|
|
165
|
+
"expo-modules-core": "^2.5.0"
|
|
167
166
|
}
|
|
168
167
|
}
|