capacitor-record360sdk 8.30.1 → 8.30.2
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
|
@@ -108,6 +108,14 @@ addListener(eventName: 'Record360Event', listenerFunc: (data: { type: 'onFailedT
|
|
|
108
108
|
|
|
109
109
|
## Changelog
|
|
110
110
|
|
|
111
|
+
### 8.30.2
|
|
112
|
+
|
|
113
|
+
Pairs with Android SDK 4.30.2 and iOS SDK 4.24.7.
|
|
114
|
+
|
|
115
|
+
Android fixes:
|
|
116
|
+
- The plugin now finishes the host activity it launched on `onSDKShouldExit`, matching the iOS dismissal. Previously a blank screen stayed up after the SDK exited until the user pressed Back.
|
|
117
|
+
- `onSDKShouldExit` now follows `onFailedToAuthenticate` when the credentials passed to a launch call are rejected, once the error dialog is dismissed. Previously no exit event arrived and the blank screen stayed up.
|
|
118
|
+
|
|
111
119
|
### 8.30.1
|
|
112
120
|
|
|
113
121
|
Capacitor 8 release carrying the unified Record360 SDK callbacks. Pairs with Android SDK 4.30.1 and iOS SDK 4.24.7.
|
package/android/build.gradle
CHANGED
|
@@ -101,6 +101,6 @@ dependencies {
|
|
|
101
101
|
testImplementation "junit:junit:$junitVersion"
|
|
102
102
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
103
103
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
104
|
-
implementation 'com.record360.sdk:android-sdk:4.30.
|
|
104
|
+
implementation 'com.record360.sdk:android-sdk:4.30.2'
|
|
105
105
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
|
|
106
106
|
}
|
|
@@ -194,6 +194,7 @@ open class CapacitorRecord360SDKPlugin : Plugin(), IRecord360Interface {
|
|
|
194
194
|
override fun onSDKShouldExit() {
|
|
195
195
|
Log.i(TAG, "onSDKShouldExit")
|
|
196
196
|
notifyListeners(EVENT_NAME, JSObject().apply { put("type", "onSDKShouldExit") })
|
|
197
|
+
SampleRecord360Activity.current?.get()?.finish()
|
|
197
198
|
}
|
|
198
199
|
|
|
199
200
|
override fun onReferenceNumberEnteredWithFieldData(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
package com.record360.plugins
|
|
2
2
|
|
|
3
3
|
import android.os.Bundle
|
|
4
|
+
import java.lang.ref.WeakReference
|
|
4
5
|
import com.record360.sdk.R360Identity
|
|
5
6
|
import com.record360.sdk.Record360Activity
|
|
6
7
|
import com.record360.sdk.ui.insets.EdgeToEdgeInitializer
|
|
@@ -9,6 +10,7 @@ import org.json.JSONObject
|
|
|
9
10
|
class SampleRecord360Activity: Record360Activity() {
|
|
10
11
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
11
12
|
super.onCreate(savedInstanceState)
|
|
13
|
+
current = WeakReference(this)
|
|
12
14
|
EdgeToEdgeInitializer.register(application)
|
|
13
15
|
val userId = if (intent.hasExtra(USER_ID_INTENT)) intent.getStringExtra(USER_ID_INTENT) else null
|
|
14
16
|
val userToken = if (intent.hasExtra(USER_TOKEN_INTENT)) intent.getStringExtra(USER_TOKEN_INTENT) else null
|
|
@@ -36,6 +38,11 @@ class SampleRecord360Activity: Record360Activity() {
|
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
|
|
41
|
+
override fun onDestroy() {
|
|
42
|
+
if (current?.get() === this) current = null
|
|
43
|
+
super.onDestroy()
|
|
44
|
+
}
|
|
45
|
+
|
|
39
46
|
private fun parseFieldData(json: String?): Map<String, String>? {
|
|
40
47
|
if (json.isNullOrEmpty()) return null
|
|
41
48
|
return try {
|
|
@@ -47,6 +54,8 @@ class SampleRecord360Activity: Record360Activity() {
|
|
|
47
54
|
}
|
|
48
55
|
|
|
49
56
|
companion object {
|
|
57
|
+
/** The host screen the SDK runs on top of; the plugin finishes it when the SDK exits. */
|
|
58
|
+
@Volatile var current: WeakReference<SampleRecord360Activity>? = null
|
|
50
59
|
var REFERENCE_NUMBER_INTENT = "SampleRecord360Activity.REF_NUM_INTENT"
|
|
51
60
|
var DEPARTMENT_INTENT = "SampleRecord360Activity.DEPARTMENT_INTENT"
|
|
52
61
|
var SEQUENCE_INTENT = "SampleRecord360Activity.SEQUENCE_INTENT"
|