react-native-move-sdk 2.2.4 → 2.2.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
|
@@ -144,7 +144,7 @@ dependencies {
|
|
|
144
144
|
// noinspection GradleDynamicVersion
|
|
145
145
|
|
|
146
146
|
implementation "com.facebook.react:react-native:+"
|
|
147
|
-
api "io.dolphin.move:move-sdk:2.2.
|
|
147
|
+
api "io.dolphin.move:move-sdk:2.2.1.65"
|
|
148
148
|
|
|
149
149
|
testImplementation 'junit:junit:4.13.2'
|
|
150
150
|
testImplementation "androidx.test:core:1.4.0"
|
|
@@ -5,12 +5,12 @@ import android.content.Context
|
|
|
5
5
|
import android.util.Log
|
|
6
6
|
import com.facebook.react.bridge.Promise
|
|
7
7
|
import com.facebook.react.bridge.ReadableArray
|
|
8
|
-
import io.dolphin.move.
|
|
8
|
+
import io.dolphin.move.MoveAssistanceCallStatus
|
|
9
9
|
import io.dolphin.move.DrivingService
|
|
10
10
|
import io.dolphin.move.MoveAuth
|
|
11
|
-
import io.dolphin.move.MoveAuthError
|
|
12
11
|
import io.dolphin.move.MoveAuthState
|
|
13
12
|
import io.dolphin.move.MoveConfig
|
|
13
|
+
import io.dolphin.move.MoveConfigurationError
|
|
14
14
|
import io.dolphin.move.MoveDetectionService
|
|
15
15
|
import io.dolphin.move.MoveSdk
|
|
16
16
|
import io.dolphin.move.MoveSdkState
|
|
@@ -155,8 +155,13 @@ class NativeMoveSdkWrapper(private val context: Context) : MoveSdk.StateListener
|
|
|
155
155
|
refreshToken = refreshToken,
|
|
156
156
|
projectId = projectId.toLong(),
|
|
157
157
|
)
|
|
158
|
+
MoveSdk.get()?.let {
|
|
159
|
+
it.tripNotification(recognitionNotification.toAndroidNotification(context))
|
|
160
|
+
it.recognitionNotification(tripNotification.toAndroidNotification(context))
|
|
161
|
+
it.walkingLocationNotification(walkingNotification.toAndroidNotification(context))
|
|
162
|
+
}
|
|
158
163
|
val moveConfig = MoveConfig(timelineDetectionServicesToUse)
|
|
159
|
-
|
|
164
|
+
MoveSdk.setup(moveAuth, moveConfig)
|
|
160
165
|
|
|
161
166
|
val moveSdkConfig = MoveSdkConfig(
|
|
162
167
|
timelineDetectionServices = timelineDetectionServicesToUse,
|
|
@@ -167,10 +172,6 @@ class NativeMoveSdkWrapper(private val context: Context) : MoveSdk.StateListener
|
|
|
167
172
|
)
|
|
168
173
|
configRepository.storeConfig(moveSdkConfig)
|
|
169
174
|
|
|
170
|
-
moveSdk.tripNotification(recognitionNotification.toAndroidNotification(context))
|
|
171
|
-
moveSdk.recognitionNotification(tripNotification.toAndroidNotification(context))
|
|
172
|
-
moveSdk.walkingLocationNotification(walkingNotification.toAndroidNotification(context))
|
|
173
|
-
|
|
174
175
|
promise?.resolve(PROMISE_OK)
|
|
175
176
|
} catch (t: Throwable) {
|
|
176
177
|
promise?.reject(Exception("SETUP_ERROR"))
|
|
@@ -249,8 +250,8 @@ class NativeMoveSdkWrapper(private val context: Context) : MoveSdk.StateListener
|
|
|
249
250
|
|
|
250
251
|
fun initiateAssistanceCall(promise: Promise) {
|
|
251
252
|
MoveSdk.get()?.initiateAssistanceCall(object : MoveSdk.AssistanceStateListener {
|
|
252
|
-
override fun onAssistanceStateChanged(assistanceState:
|
|
253
|
-
if (assistanceState ==
|
|
253
|
+
override fun onAssistanceStateChanged(assistanceState: MoveAssistanceCallStatus) {
|
|
254
|
+
if (assistanceState == MoveAssistanceCallStatus.SUCCESS) {
|
|
254
255
|
promise.resolve(true)
|
|
255
256
|
} else {
|
|
256
257
|
promise.reject(Exception(assistanceState.name.toSnakeCase()))
|
|
@@ -277,7 +278,7 @@ class NativeMoveSdkWrapper(private val context: Context) : MoveSdk.StateListener
|
|
|
277
278
|
} ?: promise.reject(Exception("GEOCODE_ERROR"))
|
|
278
279
|
}
|
|
279
280
|
|
|
280
|
-
override fun onError(error:
|
|
281
|
+
override fun onError(error: MoveConfigurationError) {
|
|
281
282
|
val data = mutableMapOf<Any, Any>()
|
|
282
283
|
data[ARGUMENT_ERROR] = error.toString().toSnakeCase()
|
|
283
284
|
emitDeviceEvent(EVENT_INIT_ERROR, data)
|
package/package.json
CHANGED