Closed faizan-19 closed 3 months ago
Faced the same issue.
The problem is that this plugin try respond to every onActivityResult
.
@shirsh94 I opened a pull request #12 to resolve the issue
@faizan-19 you can find a working branch on my fork https://github.com/fnicastri/flutter_doc_scanner/tree/fix_onActivityResult_clash
thanks @shirsh94 worked for me
Check out this on the 0.0.8 version.
E/AndroidRuntime(16727): at android.app.ActivityThread.main(ActivityThread.java:8177) E/AndroidRuntime(16727): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(16727): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) E/AndroidRuntime(16727): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) E/AndroidRuntime(16727): Caused by: kotlin.UninitializedPropertyAccessException: lateinit property resultChannel has not been initialized E/AndroidRuntime(16727): at com.shirsh.flutter_doc_scanner.FlutterDocScannerPlugin.onActivityResult(FlutterDocScannerPlugin.kt:159) E/AndroidRuntime(16727): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEngineConnectionRegistry.java:774) E/AndroidRuntime(16727): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onActivityResult(FlutterEngineConnectionRegistry.java:422) E/AndroidRuntime(16727): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:857) E/AndroidRuntime(16727): at io.flutter.embedding.android.FlutterActivity.onActivityResult(FlutterActivity.java:884) E/AndroidRuntime(16727): at android.app.Activity.dispatchActivityResult(Activity.java:8943) E/AndroidRuntime(16727): at android.app.ActivityThread.deliverResults(ActivityThread.java:5520) E/AndroidRuntime(16727): ... 13 more I/Process (16727): Sending signal. PID: 16727 SIG: 9 Lost connection to device.