scandit-capacitor-datacapture-core 6.28.0 → 7.0.0-beta.1

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.
@@ -12,9 +12,9 @@ Pod::Spec.new do |s|
12
12
  s.author = package["author"]
13
13
  s.source = { :git => package["homepage"], :tag => s.version.to_s }
14
14
  s.source_files = "ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}"
15
- s.ios.deployment_target = "13.0"
15
+ s.ios.deployment_target = "14.0"
16
16
  s.swift_version = "5.7"
17
17
 
18
18
  s.dependency "Capacitor"
19
- s.dependency "scandit-datacapture-frameworks-core", '= 6.28.0'
19
+ s.dependency "scandit-datacapture-frameworks-core", '= 7.0.0-beta.1'
20
20
  end
@@ -56,7 +56,7 @@ repositories {
56
56
  }
57
57
 
58
58
  dependencies {
59
- def sdk_version = "6.28.0"
59
+ def sdk_version = "7.0.0-beta.1"
60
60
 
61
61
  implementation fileTree(dir: 'libs', include: ['*.jar'])
62
62
 
@@ -12,7 +12,6 @@ import com.getcapacitor.annotation.Permission
12
12
  import com.getcapacitor.annotation.PermissionCallback
13
13
  import com.scandit.capacitor.datacapture.core.data.ResizeAndMoveInfo
14
14
  import com.scandit.capacitor.datacapture.core.errors.JsonParseError
15
- import com.scandit.capacitor.datacapture.core.errors.NullFrameError
16
15
  import com.scandit.capacitor.datacapture.core.handlers.DataCaptureViewHandler
17
16
  import com.scandit.capacitor.datacapture.core.utils.CapacitorResult
18
17
  import com.scandit.datacapture.core.source.FrameSourceState
@@ -23,9 +22,7 @@ import com.scandit.datacapture.frameworks.core.listeners.FrameworksDataCaptureCo
23
22
  import com.scandit.datacapture.frameworks.core.listeners.FrameworksDataCaptureViewListener
24
23
  import com.scandit.datacapture.frameworks.core.listeners.FrameworksFrameSourceDeserializer
25
24
  import com.scandit.datacapture.frameworks.core.listeners.FrameworksFrameSourceListener
26
- import com.scandit.datacapture.frameworks.core.utils.DefaultLastFrameData
27
25
  import com.scandit.datacapture.frameworks.core.utils.DefaultMainThread
28
- import com.scandit.datacapture.frameworks.core.utils.LastFrameData
29
26
  import com.scandit.datacapture.frameworks.core.utils.MainThread
30
27
  import org.json.JSONException
31
28
  import org.json.JSONObject
@@ -60,8 +57,6 @@ class ScanditCaptureCoreNative :
60
57
  FrameworksFrameSourceDeserializer(frameSourceListener)
61
58
  )
62
59
  private val mainThread: MainThread = DefaultMainThread.getInstance()
63
- private val lastFrameData: LastFrameData = DefaultLastFrameData.getInstance()
64
-
65
60
  private var lastFrameSourceState: FrameSourceState = FrameSourceState.OFF
66
61
 
67
62
  private val plugins = mutableListOf<Plugin>()
@@ -291,21 +286,9 @@ class ScanditCaptureCoreNative :
291
286
  }
292
287
 
293
288
  @PluginMethod
294
- fun getLastFrame(call: PluginCall) {
295
- lastFrameData.getLastFrameDataJson {
296
- if (it == null) {
297
- call.reject(NullFrameError().serializeContent().toString())
298
- return@getLastFrameDataJson
299
- }
300
- CapacitorResult(call).success(it)
301
- }
302
- }
303
-
304
- @PluginMethod
305
- fun getLastFrameOrNull(call: PluginCall) {
306
- lastFrameData.getLastFrameDataJson {
307
- CapacitorResult(call).success(it)
308
- }
289
+ fun getFrame(call: PluginCall) {
290
+ val frameId = call.data.getString("frameId") ?: return call.reject(EMPTY_STRING_ERROR)
291
+ coreModule.getLastFrameAsJson(frameId, CapacitorResult(call))
309
292
  }
310
293
 
311
294
  @PluginMethod
@@ -368,4 +351,9 @@ class ScanditCaptureCoreNative :
368
351
  }
369
352
 
370
353
  override fun hasListenersForEvent(eventName: String): Boolean = this.hasListeners(eventName)
354
+
355
+ @PluginMethod
356
+ fun getOpenSourceSoftwareLicenseInfo(call: PluginCall) {
357
+ coreModule.getOpenSourceSoftwareLicenseInfo(CapacitorResult(call))
358
+ }
371
359
  }