omikit-plugin 3.1.4 → 3.1.5
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.39'
|
|
108
108
|
|
|
109
109
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
110
110
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
@@ -126,6 +126,8 @@ dependencies {
|
|
|
126
126
|
implementation "com.google.code.gson:gson:2.8.9"
|
|
127
127
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
|
|
128
128
|
implementation "androidx.security:security-crypto:1.1.0-alpha06"
|
|
129
|
+
implementation "com.github.voismart:crypto:0.1.0"
|
|
130
|
+
|
|
129
131
|
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
|
|
130
132
|
implementation "com.github.bumptech.glide:glide:4.15.1"
|
|
131
133
|
annotationProcessor "com.github.bumptech.glide:compiler:4.15.1"
|
|
@@ -212,11 +212,8 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
212
212
|
super.initialize()
|
|
213
213
|
reactApplicationContext!!.addActivityEventListener(this)
|
|
214
214
|
Handler(Looper.getMainLooper()).post {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
OmiClient.getInstance(reactApplicationContext!!)
|
|
218
|
-
OmiClient.isAppReady = true;
|
|
219
|
-
OmiClient.getInstance(reactApplicationContext!!).addCallStateListener(this)
|
|
215
|
+
OmiClient.getInstance(reactApplicationContext!!).addCallStateListener(this)
|
|
216
|
+
OmiClient.isAppReady = true;
|
|
220
217
|
}
|
|
221
218
|
}
|
|
222
219
|
|
|
@@ -313,22 +310,22 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
313
310
|
val usrName = data.getString("fullName")
|
|
314
311
|
val usrUuid = data.getString("usrUuid")
|
|
315
312
|
val apiKey = data.getString("apiKey")
|
|
316
|
-
val isVideo = data.getBoolean("isVideo")
|
|
313
|
+
val isVideo = data.getBoolean("isVideo") ?: false
|
|
317
314
|
val phone = data.getString("phone")
|
|
318
315
|
val firebaseToken = data.getString("fcmToken") as String
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
316
|
+
withContext(Dispatchers.Default) {
|
|
317
|
+
try {
|
|
318
|
+
if (usrName != null && usrUuid != null && apiKey != null) {
|
|
319
|
+
loginResult = OmiClient.registerWithApiKey(
|
|
320
|
+
apiKey = apiKey,
|
|
321
|
+
userName = usrName,
|
|
322
|
+
uuid = usrUuid,
|
|
323
|
+
phone = phone ?: "",
|
|
324
|
+
isVideo = isVideo,
|
|
325
|
+
firebaseToken
|
|
326
|
+
)
|
|
327
|
+
}
|
|
328
|
+
} catch (_: Throwable) {
|
|
332
329
|
|
|
333
330
|
}
|
|
334
331
|
}
|