omikit-plugin 3.2.10 → 3.2.11
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
|
@@ -104,7 +104,7 @@ dependencies {
|
|
|
104
104
|
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
105
105
|
//noinspection GradleDynamicVersion
|
|
106
106
|
// implementation "com.facebook.react:react-native"
|
|
107
|
-
api 'vn.vihat.omicall:omi-sdk:2.0.
|
|
107
|
+
api 'vn.vihat.omicall:omi-sdk:2.0.63'
|
|
108
108
|
|
|
109
109
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
110
110
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
@@ -288,6 +288,7 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
288
288
|
@ReactMethod
|
|
289
289
|
fun initCallWithUserPassword(data: ReadableMap, promise: Promise) {
|
|
290
290
|
mainScope.launch {
|
|
291
|
+
var loginResult = false
|
|
291
292
|
val userName = data.getString("userName")
|
|
292
293
|
Log.d("dataOmi", "INIT_CALL_USER_PASSWORD ==>> $data ")
|
|
293
294
|
Log.d("dataOmi", "INIT_CALL_USER_PASSWORD ==>> $userName ")
|
|
@@ -301,13 +302,15 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
301
302
|
|
|
302
303
|
withContext(Dispatchers.Default) {
|
|
303
304
|
try {
|
|
304
|
-
|
|
305
|
-
|
|
305
|
+
if (userName != null && password != null && realm != null && firebaseToken != null) {
|
|
306
|
+
loginResult = OmiClient.register(userName, password, realm , isVideo ?: true, firebaseToken, host)
|
|
307
|
+
promise.resolve(loginResult)
|
|
306
308
|
}
|
|
307
309
|
} catch (_: Throwable) {
|
|
310
|
+
promise.resolve(loginResult)
|
|
308
311
|
}
|
|
309
312
|
}
|
|
310
|
-
|
|
313
|
+
promise.resolve(loginResult)
|
|
311
314
|
}
|
|
312
315
|
}
|
|
313
316
|
|
|
@@ -324,7 +327,7 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
324
327
|
requestPermission(isVideo)
|
|
325
328
|
withContext(Dispatchers.Default) {
|
|
326
329
|
try {
|
|
327
|
-
if (usrName != null && usrUuid != null && apiKey != null) {
|
|
330
|
+
if (usrName != null && usrUuid != null && apiKey != null && firebaseToken != null ) {
|
|
328
331
|
loginResult = OmiClient.registerWithApiKey(
|
|
329
332
|
apiKey = apiKey,
|
|
330
333
|
userName = usrName,
|