omikit-plugin 3.2.38 → 3.2.39
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/README.md +26 -17
- package/android/build.gradle +3 -3
- package/android/gradle.properties +2 -0
- package/android/settings.gradle +2 -2
- package/android/src/main/java/com/omikitplugin/OmikitPluginModule.kt +7 -11
- package/ios/CallProcess/CallManager.swift +6 -0
- package/omikit-plugin.podspec +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,16 +36,25 @@ yarn add omikit-plugin --latest
|
|
|
36
36
|
```
|
|
37
37
|
jcenter()
|
|
38
38
|
maven {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
username = "
|
|
42
|
-
password = "
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
url "https://maven.pkg.github.com/omicall/OMICall-SDK"
|
|
40
|
+
credentials {
|
|
41
|
+
username = project.findProperty("OMI_USER") ?: ""
|
|
42
|
+
password = project.findProperty("OMI_TOKEN") ?: ""
|
|
43
|
+
}
|
|
44
|
+
authentication {
|
|
45
|
+
basic(BasicAuthentication)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
dependencies {
|
|
50
|
+
api 'vn.vihat.omicall:omi-sdk:2.2.85'
|
|
47
51
|
}
|
|
48
52
|
```
|
|
53
|
+
```
|
|
54
|
+
// gradle.properties
|
|
55
|
+
OMI_USER=omicall
|
|
56
|
+
OMI_TOKEN=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
|
|
57
|
+
```
|
|
49
58
|
|
|
50
59
|
```
|
|
51
60
|
// in dependencies
|
|
@@ -73,15 +82,15 @@ allprojects {
|
|
|
73
82
|
}
|
|
74
83
|
google()
|
|
75
84
|
maven { url 'https://www.jitpack.io' }
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
maven {
|
|
86
|
+
url "https://maven.pkg.github.com/omicall/OMICall-SDK"
|
|
87
|
+
credentials {
|
|
88
|
+
username = project.findProperty("OMI_USER") ?: ""
|
|
89
|
+
password = project.findProperty("OMI_TOKEN") ?: ""
|
|
90
|
+
}
|
|
91
|
+
authentication {
|
|
92
|
+
basic(BasicAuthentication)
|
|
93
|
+
}
|
|
85
94
|
}
|
|
86
95
|
}
|
|
87
96
|
}
|
package/android/build.gradle
CHANGED
|
@@ -85,8 +85,8 @@ allprojects {
|
|
|
85
85
|
maven {
|
|
86
86
|
url "https://maven.pkg.github.com/omicall/OMICall-SDK"
|
|
87
87
|
credentials {
|
|
88
|
-
username = "
|
|
89
|
-
password = "
|
|
88
|
+
username = project.findProperty("OMI_USER") ?: ""
|
|
89
|
+
password = project.findProperty("OMI_TOKEN") ?: ""
|
|
90
90
|
}
|
|
91
91
|
authentication {
|
|
92
92
|
basic(BasicAuthentication)
|
|
@@ -103,7 +103,7 @@ dependencies {
|
|
|
103
103
|
// use for OMISDK
|
|
104
104
|
implementation("androidx.work:work-runtime:2.8.1")
|
|
105
105
|
implementation "androidx.security:security-crypto:1.1.0-alpha06"
|
|
106
|
-
api 'vn.vihat.omicall:omi-sdk:2.
|
|
106
|
+
api 'vn.vihat.omicall:omi-sdk:2.3.12'
|
|
107
107
|
|
|
108
108
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
109
109
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
package/android/settings.gradle
CHANGED
|
@@ -16,8 +16,8 @@ dependencyResolutionManagement {
|
|
|
16
16
|
maven {
|
|
17
17
|
url "https://maven.pkg.github.com/omicall/OMICall-SDK"
|
|
18
18
|
credentials {
|
|
19
|
-
username = "
|
|
20
|
-
password = "
|
|
19
|
+
username = project.findProperty("OMI_USER") ?: ""
|
|
20
|
+
password = project.findProperty("OMI_TOKEN") ?: ""
|
|
21
21
|
}
|
|
22
22
|
authentication {
|
|
23
23
|
basic(BasicAuthentication)
|
|
@@ -303,24 +303,18 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
303
303
|
mainScope.launch {
|
|
304
304
|
var loginResult = false
|
|
305
305
|
val userName = data.getString("userName")
|
|
306
|
-
Log.d("dataOmi", "INIT_CALL_USER_PASSWORD ==>> $data ")
|
|
307
|
-
Log.d("dataOmi", "INIT_CALL_USER_PASSWORD ==>> $userName ")
|
|
308
306
|
val password = data.getString("password")
|
|
309
307
|
val realm = data.getString("realm")
|
|
310
308
|
val host = data.getString("host") ?: "vh.omicrm.com"
|
|
311
309
|
val isVideo = data.getBoolean("isVideo")
|
|
312
|
-
val firebaseToken = data.getString("fcmToken")
|
|
313
|
-
|
|
314
|
-
Log.d(
|
|
315
|
-
"dataOmi",
|
|
316
|
-
"INIT_CALL_USER_PASSWORD $userName -- $password --$realm --$isVideo -- $host"
|
|
317
|
-
)
|
|
310
|
+
val firebaseToken = data.getString("fcmToken")
|
|
311
|
+
val projectId = data.getString("projectId") ?: ""
|
|
318
312
|
|
|
319
313
|
withContext(Dispatchers.Default) {
|
|
320
314
|
try {
|
|
321
315
|
if (userName != null && password != null && realm != null && firebaseToken != null) {
|
|
322
316
|
loginResult =
|
|
323
|
-
OmiClient.register(userName, password, realm, isVideo ?: true, firebaseToken, host)
|
|
317
|
+
OmiClient.register(userName, password, realm, isVideo ?: true, firebaseToken, host, projectId)
|
|
324
318
|
promise.resolve(loginResult)
|
|
325
319
|
}
|
|
326
320
|
} catch (_: Throwable) {
|
|
@@ -341,6 +335,8 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
341
335
|
val isVideo = data.getBoolean("isVideo") ?: false
|
|
342
336
|
val phone = data.getString("phone")
|
|
343
337
|
val firebaseToken = data.getString("fcmToken") as String
|
|
338
|
+
val projectId = data.getString("projectId") ?: ""
|
|
339
|
+
|
|
344
340
|
requestPermission(isVideo)
|
|
345
341
|
withContext(Dispatchers.Default) {
|
|
346
342
|
try {
|
|
@@ -351,7 +347,8 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
351
347
|
uuid = usrUuid,
|
|
352
348
|
phone = phone ?: "",
|
|
353
349
|
isVideo = isVideo,
|
|
354
|
-
firebaseToken
|
|
350
|
+
firebaseToken,
|
|
351
|
+
projectId
|
|
355
352
|
)
|
|
356
353
|
promise.resolve(true)
|
|
357
354
|
}
|
|
@@ -359,7 +356,6 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
359
356
|
promise.resolve(loginResult)
|
|
360
357
|
}
|
|
361
358
|
}
|
|
362
|
-
|
|
363
359
|
}
|
|
364
360
|
}
|
|
365
361
|
|
|
@@ -132,6 +132,9 @@ class CallManager {
|
|
|
132
132
|
//request permission
|
|
133
133
|
var result = false
|
|
134
134
|
if let usrUuid = params["usrUuid"] as? String, let fullName = params["fullName"] as? String, let apiKey = params["apiKey"] as? String, let token = params["fcmToken"] as? String {
|
|
135
|
+
if let projectID = params["projectId"] as? String, !projectID.isEmpty {
|
|
136
|
+
OmiClient.setFcmProjectId(projectID)
|
|
137
|
+
}
|
|
135
138
|
result = OmiClient.initWithUUID(usrUuid, fullName: fullName, apiKey: apiKey)
|
|
136
139
|
OmiClient.setUserPushNotificationToken(token)
|
|
137
140
|
}
|
|
@@ -146,6 +149,9 @@ class CallManager {
|
|
|
146
149
|
func initWithUserPasswordEndpoint(params: [String: Any]) -> Bool {
|
|
147
150
|
var result = false
|
|
148
151
|
if let userName = params["userName"] as? String, let password = params["password"] as? String, let realm = params["realm"] as? String, let token = params["fcmToken"] as? String {
|
|
152
|
+
if let projectID = params["projectId"] as? String, !projectID.isEmpty {
|
|
153
|
+
OmiClient.setFcmProjectId(projectID)
|
|
154
|
+
}
|
|
149
155
|
OmiClient.initWithUsername(userName, password: password, realm: realm, proxy: "")
|
|
150
156
|
OmiClient.setUserPushNotificationToken(token)
|
|
151
157
|
result = true
|
package/omikit-plugin.podspec
CHANGED