Code Monkey home page Code Monkey logo

geniusscan-sdk-demo's People

Contributors

adrien-k avatar bvirlet avatar guillaume-tgl avatar jerome-tgl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

geniusscan-sdk-demo's Issues

[Android|beta] Simple Demo crashes when used with Pixel 4 XL API 30 (virtual device)

App crashes when user taps "Scan from camera" button.

Requirements

  • Set repo on branch "beta"
  • Select Pixel 4 XL API 30 in AVD
  • Build and run Android Simple Demo

How to reproduce

  • Launch Android Simple Demo project
  • Tap "Scan from camera" button

Logs

I/tflite: Initialized TensorFlow Lite runtime.
D/GeniusScanSDK: Getting camera
D/GeniusScanSDK: Number of cameras available : 2
I/GeniusScanSDK: Camera selected : 0
D/GeniusScanSDK: Got camera - cancelled:false
D/GeniusScanSDK: Selected preview size: 1280x960
    Selected picture size: 1280x960
    Setting flash mode: auto
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.geniusscansdk.simpledemo, PID: 8914
    java.lang.RuntimeException: setParameters failed
        at android.hardware.Camera.native_setParameters(Native Method)
        at android.hardware.Camera.setParameters(Camera.java:2123)
        at com.geniusscansdk.camera.CameraManager.configureCamera(CameraManager.java:368)
        at com.geniusscansdk.camera.CameraManager.access$1300(CameraManager.java:18)
        at com.geniusscansdk.camera.CameraManager$SetupCameraTask.onPostExecute(CameraManager.java:261)
        at com.geniusscansdk.camera.CameraManager$SetupCameraTask.onPostExecute(CameraManager.java:217)
        at android.os.AsyncTask.finish(AsyncTask.java:771)
        at android.os.AsyncTask.access$900(AsyncTask.java:199)
        at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
I/Process: Sending signal. PID: 8914 SIG: 9

Can I merge multiple pdfs into one

Hi there,
I wanted to know if it's possible to merge multiple pdfs(created by genius scan) into one pdf file with your library?

As written in the docs this

  var appFolder = await getApplicationDocumentsDirectory();
          var documentUrl = appFolder.path + '/mydocument.pdf';
          var document = {
            'pages': [{ 'imageUrl': scanResult['scans'][0]['enhancedUrl'] }]
          };
          var documentGenerationConfiguration = { 'outputFileUrl': documentUrl };
          await FlutterGeniusScan.generateDocument(document, documentGenerationConfiguration);
          await OpenFile.open(documentUrl);

can be used to generate a PDF document but it requires an image type in order to do that.

Other question would be, can genius scan, when in single take mode, return a png/jpg file and not pdf?

Any help would be highly appreciated.

Thanks!

Runtime Linking issue in android

Task :app:processDebugResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processDebugResources'.

Android resource linking failed
/Users/thejasree/.gradle/caches/transforms-2/files-2.1/5dde2ad7b6bc116c332e948e929e7019/res/values-v28/values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.

/Users/thejasree/Desktop/CamScanner/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v28/values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.

/Users/thejasree/.gradle/caches/transforms-2/files-2.1/d585717eb454004e7c0401e8e435cd11/res/values/values.xml:3:5-58:857: AAPT: error: resource android:attr/fontVariationSettings not found.

/Users/thejasree/.gradle/caches/transforms-2/files-2.1/d585717eb454004e7c0401e8e435cd11/res/values/values.xml:3:5-58:857: AAPT: error: resource android:attr/ttcIndex not found.

error: failed linking references.

React-Native: 0.59.9

Not working with RN 0.61.5.

Hi,
While adding the library in my project. It gives me error on ios.
"react": "16.13.0",
"react-native": "0.61.5",
"@thegrizzlylabs/react-native-genius-scan": "^3.0.11"
Screenshot 2020-03-12 at 3 35 00 PM
Screenshot 2020-03-12 at 3 39 17 PM 1

Is it compatible with "react-native": "0.61.5" ?

Scanflow iOS with OCR creates duplicated images

  • flutter_genius_scan 4.8.0
  • iPhone 8
  • 'multiPage': false

When using the Scanflow in iOS devices and having the OCR active, after the scan is taken and cropped, if the user clicks more than once quickly the "Done" button, the same scanned page appears multiple times in the pdf file created.

I believe while the text is being recognised, every time the "Done" a new same page is added in the scan. In the debug log we can see:

[PDF] Adding image to page with inches size: 8.27x0.00
[PDF] Page transformation: x:0.00, y:0.00, scale: 0.34
[PDF] Adding HOCR information
[PDF] Adding image to page with inches size: 8.27x0.0
[PDF] Page transformation: x:0.00, y:0.00, scale: 0.34
[PDF] Adding HOCR information
[PDF] Adding image to page with inches size: 8.27x0.0
[PDF] Page transformation: x:0.00, y:0.00, scale: 0.34
[PDF] Adding HOCR information
...

The obvious solution would be to deactivate the button "Done" after it is clicked once.

Maybe this is only an issue in relatively older iPhone models.

GSSDKCore does not contain bitcode.

I am facing the below error when building the app on iOS.

...Build/Products/Debug-iphoneos/XCFrameworkIntermediates/RNGeniusScan/GSSDKCore.framework/GSSDKCore' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file '...Build/Products/Debug-iphoneos/XCFrameworkIntermediates/RNGeniusScan/GSSDKCore.framework/GSSDKCore' for architecture arm64.

The ... path is of the derived data folder.

I am using the below config on react native project:

"react": "18.1.0",
"react-native": "0.70.5",
"@thegrizzlylabs/react-native-genius-scan": "^4.7.3",

Temporary solution:
ENABLE_BITCODE = NO; instead of YES in project.pbxproj file of iOS.

Can the library team provide the updated version with a solution to this?

RN 0.61

[!] No podspec found for `RNGeniusScan` in `../node_modules/@thegrizzlylabs/react-native-genius-scan`

Any plan to support Cocoapods linking? (mandatory with RN 0.61+)

Edit: sorry I got it working (just had to remove the line and use platform :ios, '11.0')

APK size too big

Google API Error: Invalid request - APK size too big.

Uploading App APK to the Google Play Store action failed due to the APK size being too big.

While analyzing the APK in Android Studio and compare with my previous APK I found that the files of library @thegrizzlylabs/react-native-genius-scan like libgssdk-core.so and libgssdk-ocr.so are getting almost increased to 2x or 3x. I found that is the only reason behind APK failing to upload as the rest of the files are getting reduced after Hermes is included.

Below is the current project configuration:

"react": "18.1.0",
"react-native": "0.70.5",
"@thegrizzlylabs/react-native-genius-scan": "^4.7.3",

Below is the screenshot of the file increased for your reference:

Previous APK
react-native@0 66 4

Latest APK
react-native@0 70 5

React Native interface localization

Hello :)

I didn't find any option to change the language of the scanning interface in the SDK API.
Also changing the phone language didn't work :(

Any suggestions? :)

Flutter plugin crashes on android with latest update

We are using Flutter stable v1.17.0 and genius scan plugin v3.0.17. The scanner opens up and then crashes soon as you tap on the capture (camera) button.

This wasn't happening before the flutter upgrade.

Here is the error:

05-11 17:33:35.870   954  3265 V WindowManager: mCurrentFocus: Window{75f763c u0 com.teakshed.omrx/com.thegrizzlylabs.geniusscan.sdk.ui.ScanActivity} newFocus Window{357ef96 u0 com.teakshed.omrx/com.thegrizzlylabs.geniusscan.sdk.ui.ScanActivity}
05-11 17:33:35.870   954  3265 V WindowManager: Changing focus from Window{75f763c u0 com.teakshed.omrx/com.thegrizzlylabs.geniusscan.sdk.ui.ScanActivity} to Window{357ef96 u0 com.teakshed.omrx/com.thegrizzlylabs.geniusscan.sdk.ui.ScanActivity} Callers=com.android.server.wm.WindowManagerService.addWindow:2087 com.android.server.wm.Session.addToDisplay:205 android.view.IWindowSession$Stub.onTransact:124 com.android.server.wm.Session.onTransact:166 
05-11 17:33:35.872   954  3265 D WindowManager: Input focus has changed to Window{357ef96 u0 com.teakshed.omrx/com.thegrizzlylabs.geniusscan.sdk.ui.ScanActivity}
05-11 17:33:35.873   954   984 I WindowManager: Focus moving from Window{75f763c u0 com.teakshed.omrx/com.thegrizzlylabs.geniusscan.sdk.ui.ScanActivity} to Window{357ef96 u0 com.teakshed.omrx/com.thegrizzlylabs.geniusscan.sdk.ui.ScanActivity}
05-11 17:33:35.875   823   823 D AndroidRuntime: Shutting down VM
05-11 17:33:35.877   823   823 E AndroidRuntime: FATAL EXCEPTION: main
05-11 17:33:35.877   823   823 E AndroidRuntime: Process: com.teakshed.omrx, PID: 823
05-11 17:33:35.877   823   823 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lbolts/Task;
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at com.thegrizzlylabs.geniusscan.sdk.ui.CameraFragment.rotatePageAndFinish(Unknown Source:17)
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at com.thegrizzlylabs.geniusscan.sdk.ui.CameraFragment.access$600(Unknown Source:0)
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at com.thegrizzlylabs.geniusscan.sdk.ui.CameraFragment$d.onPictureTaken(Unknown Source:6)
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at com.thegrizzlylabs.geniusscan.sdk.camera.ScanFragment$c.onPictureTaken(Unknown Source:20)
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at com.thegrizzlylabs.geniusscan.sdk.camera.CameraManager$c.onPictureTaken(Unknown Source:33)
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1369)
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:202)
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6962)
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:528)
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:888)
05-11 17:33:35.877   823   823 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "bolts.Task" on path: DexPathList[[zip file "/data/app/com.teakshed.omrx-C0-lTfUvgMxSbc5tF1O_Ng==/base.apk", zip file "/data/app/com.teakshed.omrx-C0-lTfUvgMxSbc5tF1O_Ng==/split_config.arm64_v8a.apk", zip file "/data/app/com.teakshed.omrx-C0-lTfUvgMxSbc5tF1O_Ng==/split_config.en.apk", zip file "/data/app/com.teakshed.omrx-C0-lTfUvgMxSbc5tF1O_Ng==/split_config.xhdpi.apk"],nativeLibraryDirectories=[/data/app/com.teakshed.omrx-C0-lTfUvgMxSbc5tF1O_Ng==/lib/arm64, /data/app/com.teakshed.omrx-C0-lTfUvgMxSbc5tF1O_Ng==/base.apk!/lib/arm64-v8a, /data/app/com.teakshed.omrx-C0-lTfUvgMxSbc5tF1O_Ng==/split_config.arm64_v8a.apk!/lib/arm64-v8a, /data/app/com.teakshed.omrx-C0-lTfUvgMxSbc5tF1O_Ng==/split_config.en.apk!/lib/arm64-v8a, /data/app/com.teakshed.omrx-C0-lTfUvgMxSbc5tF1O_Ng==/split_config.xhdpi.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
05-11 17:33:35.877   823   823 E AndroidRuntime: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
05-11 17:33:35.877   823   823 E AndroidRuntime: 	... 12 more
05-11 17:33:35.877   823   823 E AndroidRuntime: 	Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.teakshed.omrx-C0-lTfUvgMxSbc5tF1O_Ng==/split_config.arm64_v8a.apk
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at dalvik.system.DexFile.openDexFileNative(Native Method)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at dalvik.system.DexFile.openDexFile(DexFile.java:353)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at dalvik.system.DexFile.<init>(DexFile.java:100)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at dalvik.system.DexFile.<init>(DexFile.java:74)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at dalvik.system.DexPathList.loadDexFile(DexPathList.java:374)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at dalvik.system.DexPathList.makeDexElements(DexPathList.java:337)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at dalvik.system.DexPathList.<init>(DexPathList.java:157)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:69)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:35)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:743)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at android.app.LoadedApk.getClassLoader(LoadedApk.java:777)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at android.app.LoadedApk.getResources(LoadedApk.java:1017)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at android.app.ContextImpl.createAppContext(ContextImpl.java:2387)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6032)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at android.app.ActivityThread.-wrap1(Unknown Source:0)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		... 6 more
05-11 17:33:35.877   823   823 E AndroidRuntime: 	Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.teakshed.omrx-C0-lTfUvgMxSbc5tF1O_Ng==/split_config.en.apk
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at dalvik.system.DexFile.openDexFileNative(Native Method)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at dalvik.system.DexFile.openDexFile(DexFile.java:353)
05-11 17:33:35.877   823   823 E AndroidRuntime: 		at dalvik.system.DexFile.<init>(DexFile.java:100)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.DexFile.<init>(DexFile.java:74)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.DexPathList.loadDexFile(DexPathList.java:374)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.DexPathList.makeDexElements(DexPathList.java:337)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.DexPathList.<init>(DexPathList.java:157)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:69)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:35)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:743)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.LoadedApk.getClassLoader(LoadedApk.java:777)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.LoadedApk.getResources(LoadedApk.java:1017)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.ContextImpl.createAppContext(ContextImpl.java:2387)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6032)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.ActivityThread.-wrap1(Unknown Source:0)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		... 6 more
05-11 17:33:35.878   823   823 E AndroidRuntime: 	Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.teakshed.omrx-C0-lTfUvgMxSbc5tF1O_Ng==/split_config.xhdpi.apk
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.DexFile.openDexFileNative(Native Method)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.DexFile.openDexFile(DexFile.java:353)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.DexFile.<init>(DexFile.java:100)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.DexFile.<init>(DexFile.java:74)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.DexPathList.loadDexFile(DexPathList.java:374)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.DexPathList.makeDexElements(DexPathList.java:337)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.DexPathList.<init>(DexPathList.java:157)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:69)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:35)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:743)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.LoadedApk.getClassLoader(LoadedApk.java:777)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.LoadedApk.getResources(LoadedApk.java:1017)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.ContextImpl.createAppContext(ContextImpl.java:2387)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6032)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.ActivityThread.-wrap1(Unknown Source:0)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
05-11 17:33:35.878   823   823 E AndroidRuntime: 		... 6 more
05-11 17:33:35.889   954  6319 W ActivityManager:   Force finishing activity com.teakshed.omrx/com.thegrizzlylabs.geniusscan.sdk.ui.ScanActivity
05-11 17:33:35.900   823   823 I Process : Sending signal. PID: 823 SIG: 9

Note: We have proguard rules and minify enabled. Here is our proguard file.

-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.**  { *; }
-keep class io.flutter.util.**  { *; }
-keep class io.flutter.view.**  { *; }
-keep class io.flutter.**  { *; }
-keep class io.flutter.plugins.**  { *; }
-keep public class io.flutter.embedding.android.FlutterSplashView.$SavedState { *; }
-keepattributes InnerClasses

Null Pointer Exception on Android 9/10 on Samsung Galaxy Note using SDK version 3.0.13 - Cordova

Samsung Galaxy Note10+ (d2q), 11520MB RAM, Android 9

java.lang.RuntimeException:
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4063)
at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:4095)
at android.app.servertransaction.ResumeActivityItem.execute (ResumeActivityItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1994)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:216)
at android.app.ActivityThread.main (ActivityThread.java:7263)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:975)

Caused by: java.lang.RuntimeException:
at android.app.ActivityThread.deliverResults (ActivityThread.java:4707)
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4052)

Caused by: java.lang.NullPointerException:
at com.thegrizzlylabs.geniusscan.sdk.cordova.GeniusScan.onActivityResult (GeniusScan.java:108)
at org.apache.cordova.CordovaInterfaceImpl.onActivityResult (CordovaInterfaceImpl.java:159)
at org.apache.cordova.CordovaActivity.onActivityResult (CordovaActivity.java:361)
at android.app.Activity.dispatchActivityResult (Activity.java:7809)
at android.app.ActivityThread.deliverResults (ActivityThread.java:4700)

Option to switch between single and multi page

Hi,
I am using a flutter sdk and trying to find some options to customise UI/UX. It seems that there are not many options to use. From the docs, to enable/disable multiPage it must be set in config map

     var scanConfiguration = {
            'source': 'camera',
            'multiPage': true, => here
            'ocrConfiguration': {
              'languages': ['eng'],
              'languagesDirectoryUrl': languageFolder.path
            }
          };

Is there a way to add a switch button(enable/disable multipage) while being in the camera view? In the demo app, on the top right corner user can enable or disable this. Would be nice if I could do the same.

Thanks in advance!

Xamarin & ScanFlow: Is it possible to require a minimum document size for successful scan?

By default document is fine as long as it is recognized, no matter it's relative size to camera size. i.e. if user takes a photo from a distance it will still produce a valid result, regardless of documents size in pixels.
I'd like to enforce a minimum ratio (or area) that document has to fill to product an image with enough pixels.
Basically I'd pass a percentage factor and UI would refuse to scan smaller documents (perhaps with a feedback of different color).
Is it possible with ScanFlow? If not, with custom UI?

Cordova "multiPage" order of resulting scan array

Hi there,

When enabling the "multiscan" option in scanWithConfiguration using the cordova plugin, we are looking for a way to determine the order of files as captured/ scanned by the user. I'm not sure what the default order is, I assume it has something to do with the lastmodified date of the file, as applying enhancements during multiscan seems to effect the result order.

Is there currently a method to get the original order of scanned images?

Button is behind other interface elements

We got some feedback from our customer regarding position of the flash button.

The button is behind other interface elements. there needs to be more space at the top to prevent

david_test_flight

Maybe something to improve from your side.

GeniusScanVersion: 4.7.4
OS: iOS

React Native localization

Hi!

We've recently purchased a license and I'm integrating the SDK in our app.

The app is intended to be localized only in Spanish (Chile). Android integration went smoothly and the text is translated to Spanish correctly.
However, we can't make it work correctly in IOS. I am testing in a device set up in Spanish (Chile) and the scanner text still appears in English.

I tried adding localization options in Xcode as stated in the plugin documentation (as shown in the picture) but it has not worked.

Screen Shot 2020-06-03 at 17 32 54

What can I do to fix this issue?. Or even better, is there a way to force the language of the plugin to always be Spanish, ignoring device settings?.

Thanks for your support

The minSdk version should not be declared in the android manifest file

Please, remove these lines from android/src/main/AndroidManifest.xml:

  <uses-sdk
    android:minSdkVersion="19"
    />
  • Versions
    react native 0.63.4
    com.android.tools.build:gradle 4.0.1
    @thegrizzlylabs/react-native-genius-scan 3.0.26

  • Error:

Caused by: com.android.builder.errors.EvalIssueException: Failed to parse XML in /Users/xxx/AwesomeProjet/node_modules/@thegrizzlylabs/react-native-genius-scan/android/src/main/AndroidManifest.xml
  The minSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file.
  • step to reproduce:
    gradlew clean && gradlew assembleRelease

more info

Cannot run React-Native iOS Demo

I tried to run React-native demo on a iOS device, compiled correctly then the apps crashes with this error:

dyld: Library not loaded: @rpath/GSSDK.framework/GSSDK
Referenced from: /private/var/containers/Bundle/Application/BFEA157A-0104-4A34-8B1C-C7297AFA7DEE/demo.app/demo
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/BFEA157A-0104-4A34-8B1C-C7297AFA7DEE/demo.app/Frameworks/GSSDK.framework/GSSDK: code signature invalid for '/private/var/containers/Bundle/Application/BFEA157A-0104-4A34-8B1C-C7297AFA7DEE/demo.app/Frameworks/GSSDK.framework/GSSDK'

I've tried to add manually GSSDK.framework on demo target but the error continues

Build Flutter App with Android SDK Error

I have a problem calling the GeniusScan SDK from the Flutter App. I tried to break it down to the main cause and the App crashes when trying to initiate the Genius Scan SDK.

Here is the Stacktrace:

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/android.test.mock.jar", zip file
"/system/framework/android.test.runner.jar", zip file
"/data/app/com.wenatex.sales-Zw_vtvhnkiyPYZ9R1ms44A==/base.apk"],nativeLibraryDirectories=[/data/app/com.wenatex.sales-Zw_vtvhnkiyPYZ9R1ms44A==/lib/arm64,
/data/app/com.wenatex.sales-Zw_vtvhnkiyPYZ9R1ms44A==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]] couldn't find "libgs-sdk.so"
[        ] E/AndroidRuntime(13117):     at java.lang.Runtime.loadLibrary0(Runtime.java:1012)
[        ] E/AndroidRuntime(13117):     at java.lang.System.loadLibrary(System.java:1669)
[        ] E/AndroidRuntime(13117):     at com.thegrizzlylabs.geniusscan.sdk.core.GeniusScanLibrary.<clinit>(GeniusScanLibrary.java:45)
[        ] E/AndroidRuntime(13117):     at com.thegrizzlylabs.geniusscan.sdk.core.GeniusScanLibrary.init(GeniusScanLibrary.java:54)
[        ] E/AndroidRuntime(13117):     at com.example.wenatex_android.TestActivity.initSDK(TestActivity.kt:26)
[        ] E/AndroidRuntime(13117):     at com.example.wenatex_android.TestActivity.onCreate(TestActivity.kt:21)
[        ] E/AndroidRuntime(13117):     at android.app.Activity.performCreate(Activity.java:7136)
[        ] E/AndroidRuntime(13117):     at android.app.Activity.performCreate(Activity.java:7127)
[        ] E/AndroidRuntime(13117):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
[        ] E/AndroidRuntime(13117):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2896)
[        ] E/AndroidRuntime(13117):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3051)
[        ] E/AndroidRuntime(13117):     at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
[        ] E/AndroidRuntime(13117):     at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
[        ] E/AndroidRuntime(13117):     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
[        ] E/AndroidRuntime(13117):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1811)
[        ] E/AndroidRuntime(13117):     at android.os.Handler.dispatchMessage(Handler.java:106)
[        ] E/AndroidRuntime(13117):     at android.os.Looper.loop(Looper.java:193)
[        ] E/AndroidRuntime(13117):     at android.app.ActivityThread.main(ActivityThread.java:6694)
[        ] E/AndroidRuntime(13117):     at java.lang.reflect.Method.invoke(Native Method)
[   +5 ms] E/AndroidRuntime(13117):     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
[        ] E/AndroidRuntime(13117):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
[   +3 ms] I/Process (13117): Sending signal. PID: 13117 SIG: 9
[ +212 ms] Service protocol connection closed.

And this is the Code im currently using:

class TestActivity : Activity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_test2)

        initSDK()
    }

    private fun initSDK() {
        try { // Replace this key by your key
            GeniusScanLibrary.init(this, "<key>")
        } catch (e: LicenseException) {
            AlertDialog.Builder(this)
                    .setMessage("This version is not valid anymore. Please update to the latest version.")
                    .setPositiveButton(android.R.string.ok) { dialog, which -> finish() }
                    .show()
        } catch (e: Exception) {
            print(e)
        }
    }
}

project build.gradle:

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        jcenter()

        maven { url 'https://maven.fabric.io/public' }
        maven { url 'https://s3.amazonaws.com/tgl.maven' }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // Add the google services classpath
        classpath 'com.google.gms:google-services:4.3.0'
        // Add fabric classpath
        classpath 'io.fabric.tools:gradle:1.26.1'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

subprojects {
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'androidx.core' &&
                    !details.requested.name.contains('androidx')) {
                details.useVersion "1.1.0"
            }
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

app build.gradle:

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
    compileSdkVersion 28

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    lintOptions {
        disable 'InvalidPackage'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "<identifier>"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        manifestPlaceholders = [
                'appAuthRedirectScheme': 'com.wenatex.eventapp'
        ]
        multiDexEnabled true
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
        }
    }
}

flutter {
    source '../..'
}

repositories {
    maven { url 'https://s3.amazonaws.com/tgl.maven' }
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
    implementation 'com.android.support:multidex:2.0.1'
    implementation 'com.google.firebase:firebase-firestore-ktx:21.4.1'
    // (Recommended) Add the Google Analytics dependency.
    implementation 'com.google.firebase:firebase-analytics:17.2.3'
    implementation 'com.thegrizzlylabs.geniusscan.sdk:gs-sdk:3.0.18'
    implementation 'com.thegrizzlylabs.geniusscan.sdk:gs-sdk-ocr:3.0.18'
    implementation 'com.parse.bolts:bolts-tasks:1.4.0'
    implementation 'com.parse.bolts:bolts-applinks:1.4.0'

    def supportLibraryVersion = '28.0.0'
    implementation "com.android.support:support-fragment:$supportLibraryVersion"
}

apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android-extensions'

Does anybody know what is happening here?

Generate pdf from Enhanced Url gives error

Hello again,
I am trying to generate a pdf from Enhanced Url but I am getting this in the console

E/MethodChannel#flutter_genius_scan(15904): Failed to handle method call
E/MethodChannel#flutter_genius_scan(15904): java.lang.NullPointerException
E/MethodChannel#flutter_genius_scan(15904): 	at java.io.File.<init>(File.java:283)
E/MethodChannel#flutter_genius_scan(15904): 	at com.geniusscansdk.scanflow.PluginBridge.deserializeDocumentGeneratorConfiguration(PluginBridge.java:239)
E/MethodChannel#flutter_genius_scan(15904): 	at com.geniusscansdk.scanflow.PluginBridge.generateDocument(PluginBridge.java:217)
E/MethodChannel#flutter_genius_scan(15904): 	at com.geniusscansdk.flutter.FlutterGeniusScanPlugin.onMethodCall(FlutterGeniusScanPlugin.java:86)
E/MethodChannel#flutter_genius_scan(15904): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
E/MethodChannel#flutter_genius_scan(15904): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/MethodChannel#flutter_genius_scan(15904): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#flutter_genius_scan(15904): 	at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#flutter_genius_scan(15904): 	at android.os.Handler.handleCallback(Handler.java:942)
E/MethodChannel#flutter_genius_scan(15904): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#flutter_genius_scan(15904): 	at android.os.Looper.loopOnce(Looper.java:226)
E/MethodChannel#flutter_genius_scan(15904): 	at android.os.Looper.loop(Looper.java:313)
E/MethodChannel#flutter_genius_scan(15904): 	at android.app.ActivityThread.main(ActivityThread.java:8741)
E/MethodChannel#flutter_genius_scan(15904): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_genius_scan(15904): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
E/MethodChannel#flutter_genius_scan(15904): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
I/flutter (15904): PlatformException(error, null, null, java.lang.NullPointerException
I/flutter (15904): 	at java.io.File.<init>(File.java:283)
I/flutter (15904): 	at com.geniusscansdk.scanflow.PluginBridge.deserializeDocumentGeneratorConfiguration(PluginBridge.java:239)
I/flutter (15904): 	at com.geniusscansdk.scanflow.PluginBridge.generateDocument(PluginBridge.java:217)
I/flutter (15904): 	at com.geniusscansdk.flutter.FlutterGeniusScanPlugin.onMethodCall(FlutterGeniusScanPlugin.java:86)
I/flutter (15904): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
I/flutter (15904): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
I/flutter (15904): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
I/flutter (15904): 	at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
I/flutter (15904): 	at android.os.Handler.handleCallback(Handler.java:942)
I/flutter (15904): 	at android.os.Handler.dispatchMessage(Handler.java:99)
I/flutter (15904): 	at android.os.Looper.loopOnce(Looper.java:226)
I/flutter (15904): 	at android.os.Lo

This is the method that tries to generate a PDF

  @override
  Future<String> generatePdf(List<String> imageFilePaths) async {
    try {
      final tempDir = await getTemporaryDirectory();
      final filePath =
          File('${tempDir.path}/$prefixForPdfFileName-${DateTime.now()}.pdf')
              .path;

      final pages = <Map<String, String>>[];

      for (final p in imageFilePaths) {
        pages.add({'imageUrl': p});
      }

      final document = {'pages': pages};

      final documentGenerationConfiguration = {'outputFileUrl': filePath};

      await FlutterGeniusScan.generateDocument(
          document, documentGenerationConfiguration);

      return filePath;
    } on Exception catch (e) {
      // ignore: avoid_print
      print(e);
      return '';
    }
  }

imageFilePaths contains urls that are scanned with genius scan.
It looks something like this:
file:///storage/emulated/0/Android/data/{app_identifier}/files/0c262497-af25-49c7-beae-174f96a7a11e-enhanced.jpg}]

I also tried to replace file:// with an empty String but I get the same output.

App crashes on Android when using purchases_flutter plugin together

App crashes when I use this plugin with purchases_flutter (https://docs.revenuecat.com/docs/flutter) on my Android Phone.
When I call genius SDK then app crashes, and if I remove the dependency from pubspec.yaml then it works well.
But on iPhone, it works well.

Error is like below:

AndroidRuntime(26804): Shutting down VM
E/AndroidRuntime(26804): FATAL EXCEPTION: main
E/AndroidRuntime(26804): Process: com.example.proj, PID: 23652
E/AndroidRuntime(26804): java.lang.NoSuchMethodError: No static method saveAttributeDataForStyleable(Landroid/view/View;Landroid/content/Context;[ILandroid/util/AttributeSet;Landroid/content/res/TypedArray;II)V in class Landroidx/core/view/ViewCompat; or its super classes (declaration of 'androidx.core.view.ViewCompat' appears in /data/app/com.example.proj-DTecE840qwF9BP3aeG34Mg==/base.apk)
E/AndroidRuntime(26804): at androidx.appcompat.widget.AppCompatBackgroundHelper.loadFromAttributes(AppCompatBackgroundHelper.java:51)
E/AndroidRuntime(26804): at androidx.appcompat.widget.AppCompatTextView.(AppCompatTextView.java:105)
E/AndroidRuntime(26804): at androidx.appcompat.widget.AppCompatTextView.(AppCompatTextView.java:95)
E/AndroidRuntime(26804): at androidx.appcompat.app.AppCompatViewInflater.createTextView(AppCompatViewInflater.java:194)
E/AndroidRuntime(26804): at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:115)
E/AndroidRuntime(26804): at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1551)
E/AndroidRuntime(26804): at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1602)
E/AndroidRuntime(26804): at android.view.LayoutInflater$FactoryMerger.onCreateView(LayoutInflater.java:242)
E/AndroidRuntime(26804): at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1061)
E/AndroidRuntime(26804): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:997)
E/AndroidRuntime(26804): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
E/AndroidRuntime(26804): at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123)
E/AndroidRuntime(26804): at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)
E/AndroidRuntime(26804): at android.view.LayoutInflater.inflate(LayoutInflater.java:682)
E/AndroidRuntime(26804): at android.view.LayoutInflater.inflate(LayoutInflater.java:534)
E/AndroidRuntime(26804): at com.thegrizzlylabs.geniusscan.sdk.ui.CameraFragment.onCreateView(CameraFragment.java:56)
E/AndroidRuntime(26804): at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2600)
E/AndroidRuntime(26804): at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:881)
E/AndroidRuntime(26804): at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238)
E/AndroidRuntime(26804): at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1303)
E/AndroidRuntime(26804): at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:439)
E/AndroidRuntime(26804): at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2079)
E/AndroidRuntime(26804): at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1869)
E/AndroidRuntime(26804): at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1824)
E/AndroidRuntime(26804): at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManagerImpl.java:1727)
E/AndroidRuntime(26804): at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange(FragmentManagerImpl.java:2663)
E/AndroidRuntime(26804): at androidx.fragment.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManagerImpl.java:2613)
E/AndroidRuntime(26804): at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:246)
E/AndroidRuntime(26804): at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:542)
E/AndroidRuntime(26804): at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:210)
E/AndroidRuntime(26804): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1433)
E/AndroidRuntime(26804): at android.app.Activity.performStart(Activity.java:7980)
E/AndroidRuntime(26804): at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3655)
E/AndroidRuntime(26804): at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
E/AndroidRuntime(26804): at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
E/AndroidRuntime(26804): at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
E/AndroidRuntime(26804): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
E/AndroidRuntime(26804): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2270)
E/AndroidRuntime(26804): at android.os.Handler.dispatchMessage(Handler.java:107)
E/AndroidRuntime(26804): at android.os.Looper.loop(Looper.java:237)
E/AndroidRuntime(26804): at android.app.ActivityThread.main(ActivityThread.java:8125)
E/AndroidRuntime(26804): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(26804): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
E/AndroidRuntime(26804): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)

Crash on app

My app crashes. when I see firebase; I have "Unlicensed Genius Scan SDK demo. The demo is allowed to run for 60 seconds. After that, you have to relaunch the application."

Provide upgrade instructions when changing the API

I am currently upgrading a lot of libraries in our Android app (Visma Dinero).
One of them is your wonderful library, i.e. GeniusScan, which Im upgrading from version 4.1.3 til 4.4.7,

In that process it would be nice with some migration instructions, and some deeper explanations of the changes I need to do than I can find in the changelog (https://geniusscansdk.com/docs/changelog/)

Rigt now my only option is to kinda misuse the geniusscan-sdk-demo repo and look for changes.
This is what I found relevant to me:
4dbb260
0a241a8
and now I'll have to do more or less the same changes in my app, and hope I get evrything right and that Im not overlooking anything, which might happen if I am using any functions that arent in the demo app.

I have also been considering to use wayback machine and go thru all changes in your documentation https://web.archive.org/web/*/https://geniusscansdk.com/docs/v4/android/custom-scanner-guide/

But that is time consuming, and really shouldnt be neccesary :-)

[Xamarin] Failed resolution of: Landroidx/camera/core/Preview$SurfaceProvider;

I'm getting an Exception of type java.lang.NoClassDefFoundError while trying to call GeniusScanSDK.Scanflow.PluginBridge.ScanWithConfiguration(Platform.CurrentActivity, configuration);

Using the latest version of GeniusScanSDK from nuget.

Exception:
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/camera/core/Preview$SurfaceProvider; at com.geniusscansdk.camera.ScanFragment.createBestForDevice(ScanFragment.java:131) at com.geniusscansdk.scanflow.CameraFragment.onCreateView(CameraFragment.java:95) at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2995) at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:523) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:261) at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1840) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1758) at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1701) at androidx.fragment.app.FragmentController.execPendingActions(FragmentController.java:462) at androidx.fragment.app.FragmentActivity.onResume(FragmentActivity.java:412) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1456) at android.app.Activity.performResume(Activity.java:8129) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4434) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4476) at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Xcode 'Archive' produces a corrupt archive

I have the exact same problem than in this issue: https://github.com/react-native-mapbox-gl/maps/issues/1097

To Reproduce

  • npx react-native init RNGeniusScanTest
  • cd RNGeniusScanTest
  • yarn add @thegrizzlylabs/react-native-genius-scan
  • edit Podfile to set platform :ios, '11.0'
  • cd ios && pod install
  • Open ios/RNGeniusScanTest.xcworkspace in Xcode
  • Set build to 'Any iOS Device' and set signing
  • Build with Product > Archive. Wait.
  • Build completes without errors, but it doesn't show up in Organizer
  • When trying to open the build from /Library/Developer/Xcode/Archives, get error 'The archive may be corrupt or unreadable.'

Versions

@thegrizzlylabs/react-native-genius-scan 4.0.9
Xcode: 12.5.1
React Native 0.63.4
Cocoapods 1.10.1

Crash on Android (Flutter 1.17 + GeniusScanSDK 3.0.19)

With the latest version of the plugin, seeing the following crash on Android. Works with 3.0.18.

07-03 08:15:36.264 15037 15037 E flutter : [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.NoSuchMethodError: no non-static method "Lcom/thegrizzlylabs/geniusscan/sdk/core/TextLayoutToTextConverter$CppProxy;.<init>(J)V"
07-03 08:15:36.264 15037 15037 E flutter : 	at java.lang.Runtime.nativeLoad(Native Method)
07-03 08:15:36.264 15037 15037 E flutter : 	at java.lang.Runtime.nativeLoad(Runtime.java:1115)
07-03 08:15:36.264 15037 15037 E flutter : 	at java.lang.Runtime.loadLibrary0(Runtime.java:1069)
07-03 08:15:36.264 15037 15037 E flutter : 	at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
07-03 08:15:36.264 15037 15037 E flutter : 	at java.lang.System.loadLibrary(System.java:1667)
07-03 08:15:36.264 15037 15037 E flutter : 	at com.thegrizzlylabs.geniusscan.sdk.core.GeniusScanLibrary.<clinit>(Unknown Source:9)
07-03 08:15:36.264 15037 15037 E flutter : 	at com.thegrizzlylabs.geniusscan.sdk.core.GeniusScanLibrary.init(Unknown Source:0)
07-03 08:15:36.264 15037 15037 E flutter : 	at com.thegrizzlylabs.geniusscan.sdk.ui.PluginBridge.setLicenseKey(Unknown Source:0)
07-03 08:15:36.264 15037 15037 E flutter : 	at com.thegrizzlylabs.geniusscan.sdk.flutter.FlutterGeniusScanPlugin.onMethodCall(Unknown Source:16)
07-03 08:15:36.264 15037 15037 E flutter : 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(Unknown Source:17)
07-03 08:15:36.264 15037 15037 E flutter : 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(Unknown Source:57)
07-03 08:15:36.264 15037 15037 E flutter : 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(Unknown Source:4)
07-03 08:15:36.264 15037 15037 E flutter : 	at android.os.MessageQueue.nativePollOnce(Native Method)
07-03 08:15:36.264 15037 15037 E flutter : 	at android.os.MessageQueue.next(MessageQueue.java:336)
07-03 08:15:36.264 15037 15037 E flutter : 	at android.os.Looper.loop(Looper.java:174)
07-03 08:15:36.264 15037 15037 E flutter : 	at android.app.ActivityThread.main(ActivityThread.java:7397)
07-03 08:15:36.264 15037 15037 E flutter : 	at java.lang.reflect.Method.invoke(Native Method)
07-03 08:15:36.264 15037 15037 E flutter : 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
07-03 08:15:36.264 15037 15037 E flutter : 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
07-03 08:15:36.264 15037 15037 E flutter : 
07-03 08:15:36.264 15037 15037 F flutter : [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env). 
07-03 08:15:36.265 15037 15037 F libc    : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 15037 (m.teakshed.omrx), pid 15037 (m.teakshed.omrx)
07-03 08:15:36.399 15315 15315 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
07-03 08:15:36.400  1018  1018 I /system/bin/tombstoned: received crash request for pid 15037
07-03 08:15:36.401 15315 15315 I crash_dump64: performing dump of process 15037 (target tid = 15037)
07-03 08:15:36.404  2097  2097 D StatusBarMobileView: updateState state.subId = 1  mState.visible:true  state.visible:true  state.typeId:com.android.systemui:drawable/ic_4g_mobiledata  state.strengthId:1283  state.roaming:false  this:StatusBarMobileView(slot=mobile state=MobileIconState(subId=1, strengthId=1283, roaming=false, typeId=2131231277, volteId=2131231608, visible=true))
07-03 08:15:36.410 15315 15315 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-03 08:15:36.410 15315 15315 F DEBUG   : Build fingerprint: 'Xiaomi/laurel_sprout/laurel_sprout:10/QKQ1.190910.002/V11.0.15.0.QFQMIXM:user/release-keys'
07-03 08:15:36.410 15315 15315 F DEBUG   : Revision: '0'
07-03 08:15:36.410 15315 15315 F DEBUG   : ABI: 'arm64'
07-03 08:15:36.410 15315 15315 F DEBUG   : Timestamp: 2020-07-03 08:15:36+0530
07-03 08:15:36.410 15315 15315 F DEBUG   : pid: 15037, tid: 15037, name: m.teakshed.omrx  >>> com.teakshed.omrx <<<
07-03 08:15:36.410 15315 15315 F DEBUG   : uid: 10129
07-03 08:15:36.410 15315 15315 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
07-03 08:15:36.410 15315 15315 F DEBUG   : Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env). 
07-03 08:15:36.410 15315 15315 F DEBUG   : '
07-03 08:15:36.410 15315 15315 F DEBUG   :     x0  0000000000000000  x1  0000000000003abd  x2  0000000000000006  x3  0000007fcd9888e0
07-03 08:15:36.410 15315 15315 F DEBUG   :     x4  0000000000800000  x5  0000000000800000  x6  0000000000800000  x7  0000800000000000
07-03 08:15:36.410 15315 15315 F DEBUG   :     x8  00000000000000f0  x9  7149d5342d27f44c  x10 0000000000000001  x11 0000000000000000
07-03 08:15:36.410 15315 15315 F DEBUG   :     x12 fffffff0fffffbdf  x13 0000000000000003  x14 0000000000000001  x15 0000000000000010
07-03 08:15:36.410 15315 15315 F DEBUG   :     x16 0000007e887648c0  x17 0000007e88740900  x18 0000007e8b940000  x19 0000000000003abd
07-03 08:15:36.410 15315 15315 F DEBUG   :     x20 0000000000003abd  x21 00000000ffffffff  x22 0000000000000020  x23 0000000000000095
07-03 08:15:36.410 15315 15315 F DEBUG   :     x24 0000007d89c7cec0  x25 0000007d89d7a0a0  x26 0000007d99a36000  x27 0000007e8afee650
07-03 08:15:36.410 15315 15315 F DEBUG   :     x28 0000007d99161000  x29 0000007fcd988980
07-03 08:15:36.410 15315 15315 F DEBUG   :     sp  0000007fcd9888c0  lr  0000007e886f20c4  pc  0000007e886f20f0
07-03 08:15:36.526 15315 15315 F DEBUG   : 
07-03 08:15:36.526 15315 15315 F DEBUG   : backtrace:
07-03 08:15:36.526 15315 15315 F DEBUG   :       #00 pc 00000000000830f0  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: cf739dbc84bcc78f7a1500721bfb3758)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #01 pc 00000000002af058  /data/app/com.teakshed.omrx-VemT9SXxCPrPILHze6Qbiw==/lib/arm64/libflutter.so!libflutter.so (offset 0x290000) (BuildId: 9a84530aa21d46fee2c5ee4e6a4b7d1532edfd13)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #02 pc 00000000002a3828  /data/app/com.teakshed.omrx-VemT9SXxCPrPILHze6Qbiw==/lib/arm64/libflutter.so!libflutter.so (offset 0x290000) (BuildId: 9a84530aa21d46fee2c5ee4e6a4b7d1532edfd13)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #03 pc 00000000002a223c  /data/app/com.teakshed.omrx-VemT9SXxCPrPILHze6Qbiw==/lib/arm64/libflutter.so!libflutter.so (offset 0x290000) (BuildId: 9a84530aa21d46fee2c5ee4e6a4b7d1532edfd13)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #04 pc 00000000002dda94  /data/app/com.teakshed.omrx-VemT9SXxCPrPILHze6Qbiw==/lib/arm64/libflutter.so!libflutter.so (offset 0x290000) (BuildId: 9a84530aa21d46fee2c5ee4e6a4b7d1532edfd13)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #05 pc 00000000002b068c  /data/app/com.teakshed.omrx-VemT9SXxCPrPILHze6Qbiw==/lib/arm64/libflutter.so!libflutter.so (offset 0x290000) (BuildId: 9a84530aa21d46fee2c5ee4e6a4b7d1532edfd13)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #06 pc 00000000002b27dc  /data/app/com.teakshed.omrx-VemT9SXxCPrPILHze6Qbiw==/lib/arm64/libflutter.so!libflutter.so (offset 0x290000) (BuildId: 9a84530aa21d46fee2c5ee4e6a4b7d1532edfd13)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #07 pc 000000000001836c  /system/lib64/libutils.so (android::Looper::pollInner(int)+832) (BuildId: 8dcc6a23d7b5c85e8562aa5394a3a42f)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #08 pc 0000000000017f8c  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+56) (BuildId: 8dcc6a23d7b5c85e8562aa5394a3a42f)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #09 pc 000000000013b920  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44) (BuildId: 7c435cb5dc9d1c09ad59f054febe0058)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #10 pc 00000000002a4afc  /system/framework/arm64/boot-framework.oat (art_jni_trampoline+140) (BuildId: 97d0dbc0cdffdee1013d31c09ba87556afe29349)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #11 pc 000000000073ae54  /system/framework/arm64/boot-framework.oat (android.os.MessageQueue.next+228) (BuildId: 97d0dbc0cdffdee1013d31c09ba87556afe29349)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #12 pc 0000000000737c58  /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+680) (BuildId: 97d0dbc0cdffdee1013d31c09ba87556afe29349)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #13 pc 00000000004c5894  /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.main+756) (BuildId: 97d0dbc0cdffdee1013d31c09ba87556afe29349)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #14 pc 00000000001365b8  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 3853a2ceaeb009fc07a0847a55abcf6a)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #15 pc 000000000014500c  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276) (BuildId: 3853a2ceaeb009fc07a0847a55abcf6a)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #16 pc 00000000004afc18  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: 3853a2ceaeb009fc07a0847a55abcf6a)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #17 pc 00000000004b17bc  /apex/com.android.runtime/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1480) (BuildId: 3853a2ceaeb009fc07a0847a55abcf6a)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #18 pc 000000000043cb60  /apex/com.android.runtime/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52) (BuildId: 3853a2ceaeb009fc07a0847a55abcf6a)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #19 pc 00000000000c2c34  /system/framework/arm64/boot.oat (art_jni_trampoline+180) (BuildId: a0b292b21d796006255a63781b8e3067d6a82ca3)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #20 pc 00000000009ae598  /system/framework/arm64/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+136) (BuildId: 97d0dbc0cdffdee1013d31c09ba87556afe29349)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #21 pc 00000000009b616c  /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2076) (BuildId: 97d0dbc0cdffdee1013d31c09ba87556afe29349)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #22 pc 00000000001365b8  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 3853a2ceaeb009fc07a0847a55abcf6a)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #23 pc 000000000014500c  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276) (BuildId: 3853a2ceaeb009fc07a0847a55abcf6a)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #24 pc 00000000004afc18  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: 3853a2ceaeb009fc07a0847a55abcf6a)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #25 pc 00000000004af808  /apex/com.android.runtime/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+408) (BuildId: 3853a2ceaeb009fc07a0847a55abcf6a)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #26 pc 00000000003ba5a4  /apex/com.android.runtime/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+624) (BuildId: 3853a2ceaeb009fc07a0847a55abcf6a)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #27 pc 00000000000bf99c  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+116) (BuildId: 7c435cb5dc9d1c09ad59f054febe0058)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #28 pc 00000000000c282c  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+776) (BuildId: 7c435cb5dc9d1c09ad59f054febe0058)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #29 pc 00000000000035b0  /system/bin/app_process64 (main+1376) (BuildId: b37b0ba1daa0a4dfe5092fb9afbc2648)
07-03 08:15:36.527 15315 15315 F DEBUG   :       #30 pc 000000000007e898  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108) (BuildId: cf739dbc84bcc78f7a1500721bfb3758)

scanned multiple images preview

when plugin allows to scan multiple images that time its better to show small image preview for more user friendly ui also provide cordova plugin ui modification doc

Build on Android : Could not find androidx.multidex:multidex:$multidex_version

When I try to build on Android with ./gradlew bundleRelease the build failed with this error :

* What went wrong:
Could not determine the dependencies of task ':app:collectReleaseDependencies'.
> Could not resolve all task dependencies for configuration ':app:releaseRuntimeClasspath'.
   > Could not find androidx.multidex:multidex:$multidex_version.
     Searched in the following locations:
       - file:/Users/Ludovic/.m2/repository/androidx/multidex/multidex/$multidex_version/multidex-$multidex_version.pom
       - file:/Users/Ludovic/Work/doceo_formation/node_modules/react-native/android/androidx/multidex/multidex/$multidex_version/multidex-$multidex_version.pom
       - file:/Users/Ludovic/Work/doceo_formation/node_modules/jsc-android/dist/androidx/multidex/multidex/$multidex_version/multidex-$multidex_version.pom
       - file:/Users/Ludovic/Work/doceo_formation/node_modules/@thegrizzlylabs/react-native-genius-scan/android/libs/multidex-$multidex_version.jar
       - file:/Users/Ludovic/Work/doceo_formation/node_modules/@thegrizzlylabs/react-native-genius-scan/android/libs/multidex.jar
       - https://dl.google.com/dl/android/maven2/androidx/multidex/multidex/$multidex_version/multidex-$multidex_version.pom
       - https://jcenter.bintray.com/androidx/multidex/multidex/$multidex_version/multidex-$multidex_version.pom
       - https://www.jitpack.io/androidx/multidex/multidex/$multidex_version/multidex-$multidex_version.pom
     Required by:
         project :app

Thank you in advance for your you return.

java.lang.RuntimeExceptionScanActivity

Hi, i open this issue after contact support (Guillaume ask me to add this issue here)

manufacturer : samsung
model : SM-T290
osName : android
osVersion : 9
version plugin : "@thegrizzlylabs/react-native-genius-scan": "^3.0.16"
React-native : 0.59.10

java.lang.RuntimeException ScanActivity
Failure delivering result ResultInfo{who=null, request=42, result=-1,
data=Intent { (has extras) }} to activity
{com.*.production/com..production.MainActivity}:
java.lang.NullPointerException: Attempt to invoke interface method 'void
com.facebook.react.bridge.Promise.resolve(java.lang.Object)' on a null
object reference

Scanning not working for iOS

Hi,

I am trying to use GSSDKScannerUI to scan a document and take a snap for it. Following is my code :

let configuration = GSKScannerUIConfiguration()
configuration.source = .camera
configuration.multiPage = false
configuration.pdfPageSize = .fit
configuration.pdfMaxScanDimension = 2000;
configuration.jpegQuality = 60;
configuration.postProcessingActions = .editFilter
configuration.flashButtonHidden = false
configuration.defaultFlashMode = .auto
configuration.backgroundColor = .white
configuration.foregroundColor = .red
configuration.highlightColor = .green
        
let scanner: GSKScannerUI = GSKScannerUI(configuration: configuration)
scanner.start(from: self, onSuccess: { (result) in
       print("Here is the PDF file: \(result.pdfURL)")     
}) { (error) in
       print("An error happened: \(error.localizedDescription)")
       let alert = UIAlertController(title: error.localizedDescription, message: nil, preferredStyle: .alert)
       alert.addAction(UIAlertAction(title: "OK", style: .cancel, handler: nil))
       self.present(alert, animated: true, completion: nil)
 }

In logs I get "Searching for document…" continuously. After some times it detects the document and shows "About to confirm quadrangle…" which changes to "Auto trigger decided…" and then "Did snap photo" is we keep camera steady. I can hear the sound of photo click too.

But after that nothing happens. It again starts searching for a document saying "Searching for document…"

In the above process, If I click capture button before confirming quadrangle, It gives me "Did snap photo" message. I hear photo click sound and then UI hangs.

In both the cases :

  1. Cancel button is not working.
  2. It never goes to success block or in error block.

Please help me as I am unable to find an issue here.

Exception on save (Flutter 1.17 + GeniusScanSDK 3.0.18)

After upgrading to latest (3.0.18 + flutter v1.17), the scanner works, but I get the following exception in the logs:

E/WindowManager(24491): 	at androidx.fragment.app.Fragment.performResume(Fragment.java:2649)
E/WindowManager(24491): 	at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:922)
E/WindowManager(24491): 	at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238)
E/WindowManager(24491): 	at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1303)
E/WindowManager(24491): 	at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:439)
E/WindowManager(24491): 	at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2079)
E/WindowManager(24491): 	at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1869)
E/WindowManager(24491): 	at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1824)
E/WindowManager(24491): 	at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManagerImpl.java:1727)
E/WindowManager(24491): 	at androidx.fragment.app.FragmentManagerImpl$2.run(FragmentManagerImpl.java:150)
E/WindowManager(24491): 	at android.os.Handler.handleCallback(Handler.java:873)
E/WindowManager(24491): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/WindowManager(24491): 	at android.os.Looper.loop(Looper.java:193)
E/WindowManager(24491): 	at android.app.ActivityThread.main(ActivityThread.java:6898)
E/WindowManager(24491): 	at java.lang.reflect.Method.invoke(Native Method)
E/WindowManager(24491): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
E/WindowManager(24491): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Steps:

  1. Launch scanner 3-screen flow
  2. On the 3rd screen, when you hit save, the pdf saves ok, but the above exception stack trace is seen in the logs.

ERROR ITMS-90208 on uploading to appstore

Hi everyone.

I'm getting this kind of errors after updating to 4.4.3:

ERROR ITMS-90125: The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker.
[Transporter Error Output]: ERROR ITMS-90208: Invalid Bundle. The bundle My.app/Frameworks/GSSDKCore.framework does not support the minimum OS Version specified in the Info.plist.

In my Podfile I have : platform :ios, '11.0'
React-Native: 0.63.3

Any ideas ?

Pdf File Size

Hi guys,
I was wondering is there a way to reduce file size of created pdf file?
We are getting mixed results where the file size are in between 200KB(cash invoice)-900KB(A4). Created pdf has only one page.
Our implementation looks like this:

  1. Start genius scan and store enhancedUrl in the state
      final scanConfiguration = {
        'source': 'camera',
        'multiPage': false,
      };
      final scanResult =
          await FlutterGeniusScan.scanWithConfiguration(scanConfiguration);

      if (scanResult['scans'][0]['enhancedUrl'] != null &&
          scanResult['scans'][0]['enhancedUrl'].isNotEmpty) {
        return scanResult['scans'][0]['enhancedUrl'];
      }
  1. Create pdf from enhancedUrls before an upload
  final tempDir = await getTemporaryDirectory();

      final date = DateTime.now().asInvoiceDateString;

      final filePath = '${tempDir.path}/$prefixForPdfFileName-$date.pdf';

      final pages = <Map<String, String>>[];

      for (final p in imageFilePaths) {
        pages.add({'imageUrl': p});
      }

      final document = {'pages': pages};

      final documentGenerationConfiguration = {'outputFileUrl': filePath};

      await FlutterGeniusScan.generateDocument(
          document, documentGenerationConfiguration);

      return filePath;

We expected better results then by using normal camera in flutter regarding file sizes. Is there a way to compress pdf or such?
Any help/hint would be highly appreciated.

Way to show the ScanFragment without needing Activity to implement ScanFragment.CameraCallbackProvider

Hi, I want to integrate the ScanFragment into a React Native application, creating it as a View that can be embedded into a React Native view hierarchy. I found that it is possible to add Fragments to a FrameLayout and return that as my custom view to show in React. The problem comes when the ScanFragment needs the parent activity or fragment to implement the CallbackProvider, which is impossible as I don't have access to the parent Activity.
Is there any way of setting up GeniusScan to allow me to show the scan view without needed the callback?

Android demo-custom is broken on latest commit

Latest commit (527d0ba) broke android demo.

Fatal crash:


  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File com.geniusscansdk.demo.model.Page.getOriginalImage()' on a null object reference
        at com.geniusscansdk.demo.processing.BorderDetectionActivity.onResume(BorderDetectionActivity.java:51)
        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1413)

caused by:

 java.lang.ClassCastException: com.geniusscansdk.demo.model.Page cannot be cast to android.os.Parcelable
        at android.os.Bundle.getParcelable(Bundle.java:946)
        at android.content.Intent.getParcelableExtra(Intent.java:7485)
        at com.geniusscansdk.demo.processing.BorderDetectionActivity.onCreate(BorderDetectionActivity.java:45)

As Page implements Serializable now. Changing BorderDetectionActivity.onCreate page = getIntent().getParcelableExtra(EXTRA_PAGE); to page = getIntent().getSerializableExtra(EXTRA_PAGE); doesn't help as also Quadrangle doesn't implement Serializable so it will crash in BorderDetectionActivity.select method :)

Rendering-Problem on Android-Device(s)

Hi everyone.

When I run the flutter demo project on an android devide some controls "flow" out of screen:

Selection_013

Am I usind it wrong, is it a bug or expected behaviour?

On iOS everything works fine...

Thanks.

symbol(s) not found for architecture armv7

Hello,

When we try to build a release version with the SDK we get this error:

Undefined symbols for architecture armv7:
"OBJC_CLASS$_GSKScannerUI", referenced from:
objc-class-ref in libRNGeniusScan.a(RNGeniusScan.o)
"OBJC_CLASS$_GSKScannerUIConfiguration", referenced from:
objc-class-ref in libRNGeniusScan.a(RNGeniusScan.o)
"OBJC_CLASS$_GSK", referenced from:
objc-class-ref in libRNGeniusScan.a(RNGeniusScan.o)
ld: symbol(s) not found for architecture armv7

When I build in debug, it works.
We are using @thegrizzlylabs/react-native-genius-scan - 3.0.8 and react-native 0.59.10.
Any ideas?

White screen on IOS

Only on first install of the application I'm facing white screen on IOS.
I.e. I accept all permissions that it is asking, then it goes to the white screen.
But if I close then reopen application again it will work.

ReactNative - 0.63.3
react-native-genius-scan - 4.0.8
iPhone 6
IOS version - 12.5.3

Pick images from gallery

Hi,
I am using a flutter sdk and trying to find some options to customise UI/UX.

Is there a way to add a go to gallery button(or any other button) while being in the camera view? Similar to the normal camera UX where user can access gallery and pick single/multiple images.

Thanks in advance!

Question: custom labels possible

Hi everyone.

We are looking for the possibility to provide custom labels to the flutter plugin for the GeniusScanSDK.

Is it possible to do so and if yes, how could we achieve that?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.