voice-react-native-sdk 1.6.2-fork.5 → 1.6.2-fork.6
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
CHANGED
|
@@ -25,6 +25,7 @@ buildscript {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
apply plugin: 'com.android.library'
|
|
28
|
+
apply plugin: 'kotlin-android'
|
|
28
29
|
|
|
29
30
|
def safeExtGet(prop, fallback) {
|
|
30
31
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
@@ -58,27 +59,6 @@ android {
|
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
// Explicit task dependencies to prevent Gradle conflicts
|
|
62
|
-
// Handle both possible naming conventions that might be generated
|
|
63
|
-
tasks.matching { it.name == 'packageDebugResources' }.configureEach {
|
|
64
|
-
dependsOn tasks.matching { it.name == 'generateDebugResValues' }
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
tasks.matching { it.name == 'packageReleaseResources' }.configureEach {
|
|
68
|
-
dependsOn tasks.matching { it.name == 'generateReleaseResValues' }
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Alternative approach - configure all resource tasks
|
|
72
|
-
afterEvaluate {
|
|
73
|
-
tasks.matching { it.name.contains('packageDebugResources') }.configureEach {
|
|
74
|
-
dependsOn tasks.matching { it.name.contains('generateDebugResValues') }
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
tasks.matching { it.name.contains('packageReleaseResources') }.configureEach {
|
|
78
|
-
dependsOn tasks.matching { it.name.contains('generateReleaseResValues') }
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
62
|
repositories {
|
|
83
63
|
google()
|
|
84
64
|
mavenCentral()
|
|
@@ -97,6 +77,7 @@ dependencies {
|
|
|
97
77
|
implementation "com.google.firebase:firebase-messaging:${versions.firebaseMessaging}"
|
|
98
78
|
implementation "com.twilio:audioswitch:${versions.audioSwitch}"
|
|
99
79
|
implementation 'com.google.android.material:material:1.1.0'
|
|
80
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"
|
|
100
81
|
implementation project(':expo-modules-core')
|
|
101
82
|
|
|
102
83
|
constraints {
|
|
@@ -10,7 +10,19 @@ public class ExpoActivityLifecycleListener implements ReactActivityLifecycleList
|
|
|
10
10
|
|
|
11
11
|
@Override
|
|
12
12
|
public void onCreate(Activity activity, Bundle savedInstanceState) {
|
|
13
|
-
|
|
13
|
+
// Create a PermissionsRationaleNotifier implementation
|
|
14
|
+
VoiceActivityProxy.PermissionsRationaleNotifier notifier = new VoiceActivityProxy.PermissionsRationaleNotifier() {
|
|
15
|
+
@Override
|
|
16
|
+
public void displayRationale(String permission) {
|
|
17
|
+
// Log the permission rationale for debugging
|
|
18
|
+
SDKLog logger = new SDKLog(ExpoActivityLifecycleListener.class);
|
|
19
|
+
logger.debug("Permission rationale needed for: " + permission);
|
|
20
|
+
// You can add additional logic here to show a dialog or notification
|
|
21
|
+
// to the user explaining why the permission is needed
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
this.voiceActivityProxy = new VoiceActivityProxy(activity, notifier);
|
|
14
26
|
this.voiceActivityProxy.onCreate(savedInstanceState);
|
|
15
27
|
}
|
|
16
28
|
|
|
@@ -18,15 +18,17 @@ class ExpoModule : Module() {
|
|
|
18
18
|
val uuid = UUID.randomUUID()
|
|
19
19
|
val callListenerProxy = CallListenerProxy(uuid, context)
|
|
20
20
|
|
|
21
|
+
val call = VoiceApplicationProxy.getVoiceServiceApi().connect(
|
|
22
|
+
connectOptions,
|
|
23
|
+
callListenerProxy
|
|
24
|
+
)
|
|
25
|
+
|
|
21
26
|
val callRecord = CallRecordDatabase.CallRecord(
|
|
22
27
|
uuid,
|
|
23
|
-
|
|
24
|
-
connectOptions,
|
|
25
|
-
callListenerProxy
|
|
26
|
-
),
|
|
28
|
+
call,
|
|
27
29
|
"Callee", // provide a mechanism for determining the name of the callee
|
|
28
30
|
HashMap(), // provide a mechanism for passing custom TwiML parameters
|
|
29
|
-
CallRecord.Direction.OUTGOING,
|
|
31
|
+
CallRecordDatabase.CallRecord.Direction.OUTGOING,
|
|
30
32
|
"Display Name" // provide a mechanism for determining the notification display name of the callee
|
|
31
33
|
)
|
|
32
34
|
|