omikit-plugin 2.2.3 → 2.2.4
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
CHANGED
|
@@ -298,11 +298,8 @@ if (@available(iOS 10.0, *)) {
|
|
|
298
298
|
import { configPushNotification } from 'omikit-plugin';
|
|
299
299
|
|
|
300
300
|
configPushNotification({
|
|
301
|
+
notificationIcon : "calling_face", //notification icon on Android
|
|
301
302
|
prefix : "Cuộc gọi tới từ: ",
|
|
302
|
-
declineTitle : "Từ chối",
|
|
303
|
-
acceptTitle : "Chấp nhận",
|
|
304
|
-
acceptBackgroundColor : "#FF3700B3",
|
|
305
|
-
declineBackgroundColor : "#FF000000",
|
|
306
303
|
incomingBackgroundColor : "#FFFFFFFF",
|
|
307
304
|
incomingAcceptButtonImage : "join_call", //image name
|
|
308
305
|
incomingDeclineButtonImage : "hangup", //image name
|
package/android/build.gradle
CHANGED
|
@@ -96,7 +96,7 @@ dependencies {
|
|
|
96
96
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
97
97
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
98
98
|
|
|
99
|
-
api 'vn.vihat.omicall:omi-sdk:1.
|
|
99
|
+
api 'vn.vihat.omicall:omi-sdk:1.2.6'
|
|
100
100
|
|
|
101
101
|
implementation 'androidx.core:core-ktx:1.7.0'
|
|
102
102
|
implementation 'androidx.fragment:fragment-ktx:1.4.0'
|
|
@@ -51,7 +51,7 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
51
51
|
val map: WritableMap = WritableNativeMap()
|
|
52
52
|
val timeStartToAnswer = call["time_start_to_answer"] as Long?
|
|
53
53
|
val timeEnd = call["time_end"] as Long
|
|
54
|
-
map.putString("transaction_id", call["transaction_id"] as String)
|
|
54
|
+
map.putString("transaction_id", call["transaction_id"] as String?)
|
|
55
55
|
map.putString("direction", call["direction"] as String)
|
|
56
56
|
map.putString("source_number", call["source_number"] as String)
|
|
57
57
|
map.putString("destination_number", call["destination_number"] as String)
|
|
@@ -72,7 +72,6 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
72
72
|
startTime: Long,
|
|
73
73
|
transactionId: String?,
|
|
74
74
|
) {
|
|
75
|
-
OmiClient.instance.changeLocalCameraOrientation(0)
|
|
76
75
|
Handler(Looper.getMainLooper()).postDelayed({
|
|
77
76
|
Log.d("OmikitReactNative", "onCallEstablished")
|
|
78
77
|
val map: WritableMap = WritableNativeMap()
|
|
@@ -139,24 +138,17 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
139
138
|
@ReactMethod
|
|
140
139
|
fun configPushNotification(data: ReadableMap, promise: Promise) {
|
|
141
140
|
currentActivity?.runOnUiThread {
|
|
141
|
+
val notificationIcon = data.getString("notificationIcon")
|
|
142
142
|
val prefix = data.getString("prefix")
|
|
143
|
-
val declineTitle = data.getString("declineTitle")
|
|
144
|
-
val acceptTitle = data.getString("acceptTitle")
|
|
145
|
-
val acceptBackgroundColor = data.getString("acceptBackgroundColor")
|
|
146
|
-
val declineBackgroundColor = data.getString("declineBackgroundColor")
|
|
147
143
|
val incomingBackgroundColor = data.getString("incomingBackgroundColor")
|
|
148
144
|
val incomingAcceptButtonImage = data.getString("incomingAcceptButtonImage")
|
|
149
145
|
val incomingDeclineButtonImage = data.getString("incomingDeclineButtonImage")
|
|
150
146
|
val prefixMissedCallMessage = data.getString("prefixMissedCallMessage")
|
|
151
|
-
val missedCallTitle = data.getString("missedCallTitle")
|
|
152
147
|
val backImage = data.getString("backImage")
|
|
153
148
|
val userImage = data.getString("userImage")
|
|
154
149
|
OmiClient.instance.configPushNotification(
|
|
150
|
+
notificationIcon = notificationIcon ?: "",
|
|
155
151
|
prefix = prefix ?: "Cuộc gọi tới từ: ",
|
|
156
|
-
declineTitle = declineTitle ?: "Từ chối",
|
|
157
|
-
acceptTitle = acceptTitle ?: "Chấp nhận",
|
|
158
|
-
acceptBackgroundColor = acceptBackgroundColor ?: "#FF3700B3",
|
|
159
|
-
declineBackgroundColor = declineBackgroundColor ?: "#FF000000",
|
|
160
152
|
incomingBackgroundColor = incomingBackgroundColor ?: "#FFFFFFFF",
|
|
161
153
|
incomingAcceptButtonImage = incomingAcceptButtonImage ?: "join_call",
|
|
162
154
|
incomingDeclineButtonImage = incomingDeclineButtonImage ?: "hangup",
|
|
@@ -312,7 +304,7 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
312
304
|
val map: WritableMap = WritableNativeMap()
|
|
313
305
|
val timeStartToAnswer = call["time_start_to_answer"] as Long?
|
|
314
306
|
val timeEnd = call["time_end"] as Long
|
|
315
|
-
map.putString("transaction_id", call["transaction_id"] as String)
|
|
307
|
+
map.putString("transaction_id", call["transaction_id"] as String?)
|
|
316
308
|
map.putString("direction", call["direction"] as String)
|
|
317
309
|
map.putString("source_number", call["source_number"] as String)
|
|
318
310
|
map.putString("destination_number", call["destination_number"] as String)
|
package/omikit-plugin.podspec
CHANGED