omikit-plugin 3.3.9 → 3.3.10
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
|
@@ -122,7 +122,7 @@ dependencies {
|
|
|
122
122
|
implementation("androidx.work:work-runtime:2.8.1")
|
|
123
123
|
implementation "androidx.security:security-crypto:1.1.0-alpha06"
|
|
124
124
|
// api 'vn.vihat.omicall:omi-sdk:2.3.23'
|
|
125
|
-
api "io.omicrm.vihat:omi-sdk:2.3.
|
|
125
|
+
api "io.omicrm.vihat:omi-sdk:2.3.91"
|
|
126
126
|
|
|
127
127
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
128
128
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
@@ -859,13 +859,29 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
859
859
|
val uuid = data.getString("usrUuid") as String
|
|
860
860
|
val isVideo = data.getBoolean("isVideo")
|
|
861
861
|
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
862
|
+
// Check if OmiClient instance and service are ready before making call
|
|
863
|
+
val omiClient = OmiClient.getInstance(reactApplicationContext!!)
|
|
864
|
+
if (omiClient == null) {
|
|
865
|
+
callResult = null
|
|
866
|
+
return@withContext
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
// Add small delay to ensure service is fully initialized
|
|
870
|
+
kotlinx.coroutines.delay(100)
|
|
871
|
+
|
|
872
|
+
callResult = omiClient.startCallWithUuid(uuid = uuid, isVideo = isVideo)
|
|
873
|
+
} catch (e: IllegalStateException) {
|
|
874
|
+
// Handle service not ready state
|
|
875
|
+
callResult = null
|
|
876
|
+
} catch (e: NullPointerException) {
|
|
877
|
+
// Handle null pointer exceptions
|
|
878
|
+
callResult = null
|
|
879
|
+
} catch (e: Throwable) {
|
|
880
|
+
// Handle any other exceptions
|
|
881
|
+
callResult = null
|
|
866
882
|
}
|
|
867
883
|
}
|
|
868
|
-
var statusCalltemp = callResult?.ordinal ?:
|
|
884
|
+
var statusCalltemp = callResult?.ordinal ?: 8
|
|
869
885
|
map.putInt("status", statusCalltemp)
|
|
870
886
|
map.putString("_id", "")
|
|
871
887
|
map.putString("message", messageCall(statusCalltemp) as String)
|