Giter Site home page Giter Site logo

fast_barcode_scanner's Introduction

Moin!

I'm Joshua. I love to build things with code people can use everywhere (aka from their smartphones) and exerimenting with different ways to interact with computers. Also true open-source advocate.

  • 🥞 Professional Crêpe-distributor Metrics

fast_barcode_scanner's People

Contributors

florian-schoenherr avatar jhoogstraat 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fast_barcode_scanner's Issues

Return all scanned codes

Both Google MLKit and AVFoundation return all visible barcodes when doing image analysis. However, this plugin only returns the first code in the list. This is fine for many use cases, but my use case calls for analysis of all visible codes at once.

Newest flutter/kotlin version?

I'm getting a lot of these errors:
image

Any idea where I might need to upgrade/downgrade things? I don't really know how I would downgrade kotlin or why I would need to 😅

The scanner does not work the first time it is opened

The reader only works after opening the player a second time.

Also, when opening the camera a second time with dispose = true, it is displayed "Camera is already initialized" and when exiting "Camera is not running" is displayed.

Both problems are occurring after the last changes to the package.

Thanks man!

dense pdf417 codes are not recognized

while attempting to scan the back of my drivers license using the develop branch I discovered that the pdf417 code on my card was not being recognized on Android. I switched back to the main branch to test and found that it scanned it easily. Doing a quick analysis of the native code differences and I discovered a difference in how the preview and analysis image sources are configured. On the main branch they are configured identically, but on the develop, the analysis image does not specify a specific target resolution like the preview image does. I corrected this behavior and discovered that my license pdf417 code can now be scanned. I believe what is happening is that under the hood the analysis image is skewed slightly. I think this ends up being ok for lots of codes like QR and code128 but caused the pdf417 on my license card to be unrecognized.

We need to adjust the analysis image size so that it will recognize all codes that it can see.

iOS resume detector

In IOS, when you have pauseDetection mode, the application stops completely and throws the following error:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCaptureMetadataOutput setMetadataObjectTypes:] Unsupported type found - use -availableMetadataObjectTypes'
*** First throw call stack:
(0x1804790fc 0x198cb3d64 0x19ee43470 0x100fe16f0 0x100fe6c60 0x100fe4904 0x103a3d94c 0x10358e120 0x10390aaec 0x103838204 0x10383bf5c 0x18048e318 0x180412cf0 0x18040d4ec 0x1803ebd08 0x1803ff468 0x19bf8a38c 0x182da1088 0x182b1f958 0x10052ad20 0x100611aa4)
libc++abi: terminating with uncaught exception of type NSException

  • thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001b79b3964 libsystem_kernel.dylib__pthread_kill + 8 libsystem_kernel.dylib__pthread_kill:
    -> 0x1b79b3964 <+8>: b.lo 0x1b79b3984 ; <+40>
    0x1b79b3968 <+12>: pacibsp
    0x1b79b396c <+16>: stp x29, x30, [sp, #-0x10]!
    0x1b79b3970 <+20>: mov x29, sp
    Target 0: (Runner) stopped.
    Lost connection to device.

support OCR scanning

@jhoogstraat , As a shipping and logistics company, my company's app relies on barcode scanning heavily. All of our packages have scannable codes. However, in the real world, printing errors and damaged labels can sometimes make it impossible to scan a code. In most cases though, there's enough information on the shipping label itself to verify that the driver has the correct package. the barcode is often printed with its value directly below it. We have the recipient's name, address, and other identifying information. I recognize that it may seem a bit out of scope for a package titled "fast_barcode_scanner" to also scan text, but performing the OCR using ML Kit and Vision API's in the native code is the ideal place to do it.

What I'm proposing here is that I add a text recognition option to the ML platform implementations. The user can request text recognition in addition to machine-readable codes. For both Vision and MLKit, the implementation of text recognition is very similar to barcodes and I think it would be a clean implementation. What are your thoughts of putting that here?

Kotlin version error during gradle build

: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
e: /Users/xx/.gradle/caches/transforms-2/files-2.1/1519caaecc29bca0884153c212aa7c94/jetified-kotlin-stdlib-common-1.5.21.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
e: /Users/xx/.gradle/caches/transforms-2/files-2.1/41cc72267ca75397ebfff8df7400373f/jetified-kotlin-stdlib-1.5.21.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.

Please update kotlin version in gradle to latest 1.5.30

Crash MetadataOutput

I think this code will fix the crash:

extension BarcodeReader: AVCaptureMetadataOutputObjectsDelegate {
	// runs on dispatch queue
    func metadataOutput(_ output: AVCaptureMetadataOutput,
                        didOutput metadataObjects: [AVMetadataObject],
                        from connection: AVCaptureConnection) {
		guard metadataObjects.count > 0
			else { return }
      ...

Here is the crash log:
$s20fast_barcode_scanner13BarcodeReaderC14metadataOutput_03didG04fromySo017AVCaptureMetadataG0C_SaySo16AVMetadataObjectCGSo0J10ConnectionCtFTf4dndn_n + 724

The old code is below. What do you think? My first time with Swift.

extension BarcodeReader: AVCaptureMetadataOutputObjectsDelegate {
	// runs on dispatch queue
    func metadataOutput(_ output: AVCaptureMetadataOutput,
                        didOutput metadataObjects: [AVMetadataObject],
                        from connection: AVCaptureConnection) {
		guard
			let metadata = metadataObjects.first,
			let readableCode = metadata as? AVMetadataMachineReadableCodeObject
			else { return }

		pauseIfRequired()

		codeCallback([flutterMetadataObjectTypes[readableCode.type]!, readableCode.stringValue!])
	}
}

Unable to use front camera

First thanks for such a great plugin.

I am trying to figure out how to get the front camera to work. I tried setting the CameraPosition.front, but it doesn't seem to work. I have included the relevant code below. Any ideas how to fix this?

`return BarcodeCamera(
types: barcodeTypes,

  resolution: Resolution.hd720,
  framerate: Framerate.fps30,
  position: CameraPosition.front,

...
);`

iOS, app crash when camera permissions are declined

When declining the camera permission on iOS, the app just totally crash.
Here is the log:

 Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=AVFoundationErrorDomain Code=-11852 "Cannot use Back Camera" UserInfo={NSLocalizedFailureReason=This app is not authorized to use Back Camera., AVErrorDeviceKey=<AVCaptureFigVideoDevice: 0x11a65f140 [Back Camera][com.apple.avfoundation.avcapturedevice.built-in_video:0]>, NSLocalizedDescription=Cannot use Back Camera}: file fast_barcode_scanner/BarcodeReader.swift, line 112

On version 1.1.1.

Should not crash the app but instead called the onError callback.
Capture d’écran 2021-09-13 à 15 55 44

Null check operator used on a null value

I get this report on sentry, not sure how to reproduce it.

#0      State.setState (package:flutter/src/widgets/framework.dart:1108), 
#1      BarcodeCameraState.didChangeDependencies.<anonymous closure> (package:fast_barcode_scanner/src/barcode_camera.dart:57), 
#2      _rootRun (dart:async/zone.dart:1346), 
#3      _CustomZone.run (dart:async/zone.dart:1258), 
#4      _FutureListener.handleWhenComplete (dart:async/future_impl.dart:179), 
#5      Future._propagateToListeners.handleWhenCompleteCallback (dart:async/future_impl.dart:677), 
#6      Future._propagateToListeners (dart:async/future_impl.dart:733), 
#7      Future._completeWithValue (dart:async/future_impl.dart:542), 
#8      _completeOnAsyncReturn (dart:async-patch/async_patch.dart:264), 
#9      CameraController.initialize (package:fast_barcode_scanner/src/camera_controller.dart), 
<asynchronous suspension>, 
, 
Null check operator used on a null value, 
08-20 18:39:30.605 E/main
Uncaught error!! Null check operator used on a null value

Version fast_barcode_scanner 1.1.1

Update fast_barcode_scanner_platform_interface dependency in pubspec.yaml from relative path to full path

Unable to use project from github
Please update your pubspec.yaml to full path dependency
fast_barcode_scanner_platform_interface:
git:
url: https://github.com/jhoogstraat/fast_barcode_scanner.git
path: fast_barcode_scanner_platform_interface

dependency_overrides:
fast_barcode_scanner_platform_interface:
git:
url: https://github.com/jhoogstraat/fast_barcode_scanner.git
path: fast_barcode_scanner_platform_interface

fast_barcode_scanner: Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value + 0

I wish I could find more information on this, but it is crashing on iOS. Running 14.6 on an iPhone 12 Pro. The error takes a while to show up. I had to run for an hour or so intermittently. It crashed on me a few times though.

I think the error is here:

func stop(pause: Bool) {
torchActiveBeforeStop = captureDevice.isTorchActive
--> captureSession.stopRunning()

It doesn’t look like that code changed in your recent pull request, but the last version is not crashing.

Animations don't work

I don't know if it's a problem that only happens to me or if it's not yet a feature of the adaptation

I refer to the animation when reading the barcode (shown in the example from the material design website)

Code that I use:

BarcodeCamera(
        types: const [BarcodeType.ean8, BarcodeType.ean13, BarcodeType.code128],
        resolution: Resolution.hd720,
        framerate: Framerate.fps30,
        mode: DetectionMode.pauseDetection,
        onScan: (code) {
          ScaffoldMessenger.of(context).showSnackBar(
            SnackBar(content: Text(code.value)),
          );
        },
        children: const [
          MaterialPreviewOverlay(
            animateDetection: true,
          ),
          BlurPreviewOverlay(duration: Duration(seconds: 1))
        ],
      ),

Android refused permission don't called onError

I'm using 1.1.3 and on android when declining camera permission the screen stay black like it's waiting for video stream.

OnError should be called so we can show an error message to the users.

reader is swapping numbers for invalid characters

I'm using your package, which by the way is very good, and I came across a problem that occurs when I try to read a barcode containing only numbers, for some reason the reader gets lost and exchanges some numbers for invalid characters, for example:
The code that should be read is - "2207717493554851",
but the reader reads and returns to me - "F1/871749%3E'5.851"

I'm using type: code128, but I tried it with UPC-E and the same problem occurs.

Crash metadataOutput AVCaptureMetadata

Looks like this crash is back in version 1.1.2 on iOS, assuming the most recent build too, since I didn't see any code changes in the file that is crashing. The firebase error is: $s20fast_barcode_scanner13BarcodeReaderC14metadataOutput_03didG04fromySo017AVCaptureMetadataG0C_SaySo16AVMetadataObjectCGSo0J10ConnectionCtFTf4dndn_n + 724. I am waiting for xcode to give me more information.

I think this is related to #17. However, the error did not occur in the fixes from #17. This is the file that the crash is occurring in: https://github.com/jhoogstraat/fast_barcode_scanner/blob/main/fast_barcode_scanner/ios/Classes/BarcodeReader.swift

I am still waiting for Xcode to tell me where the crash is. Have you been seeing the same crash? I am thinking I could just add a few guards on that file and try it?

Capture image in addition to barcode

Congratulations on the brilliant package! I had problems with others...
I would like to suggest an implementation at least in the fast_barcode_scanner interface for me or others to implement in Flutter.
The idea would be to capture an image passing parameter (perhaps with name format?) to the interface to return bytes (or something else) of the capture.
Instead of also having to implement other packages that already use CameraX, I could use it to capture images... even thinking about using other features of MLKit...

Simplify configuration

Right now configuring the camera can be difficult, because you might not know the hardware which the scanner is running on.
ML Kit allows to configure the camera automatically to allow for optimal performance.

I propose removing the configuration capabilities in favor of a simpler api.
This includes the framerate and resolution.

Android build changes needed to use library in new project based on template

Trying to use the library with a new flutter project, flutter doctor output :

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.19042.1348], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0-rc1)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.6)
[√] Android Studio (version 2020.3)
[√] Connected device (4 available)

Importing V1.1.4 into a new project required the following changes to the project generated by Flutter to support a phone running Android 12 (Pixel 6) and another running Android 10.

  • \android\build.gradle - "ext.kotlin_version = '1.3.50'" to "ext.kotlin_version = '1.4.32'"
  • \android\build.gradle - "classpath 'com.android.tools.build:gradle:4.1.0'" to "classpath 'com.android.tools.build:gradle:4.1.3'"
  • \android\app\build.gradle - "compileSdkVersion 30" to "compileSdkVersion 31"
  • \android\app\build.gradle - "targetSdkVersion 30" to "targetSdkVersion 31"
  • \android\app\build.gradle - "minSdkVersion 16" to "minSdkVersion 21" (Documented on pub.dev)
  • \android\app\src\main\AndroidManifest.xml - add android:exported="true" to the application tag (Android 12 requirement)

Crash: SurfaceTexture::detachFromContext (Android)

I am getting a SurfaceTexture crash when using the BottomNavBar. The crash is not immediate, but happens after a little use.

Here is a possible fix: flutter/flutter#83090.

         ThreadManager.getUIHandler().postDelayed({
            surfaceTextureEntry?.let {
                it.release()
                surfaceTextureEntry = null
            }

        }, 2000)

Your code I found is in the BarcodeReader.kt:

        cameraSurfaceProvider = Preview.SurfaceProvider {
            val surfaceTexture = flutterTextureEntry.surfaceTexture()
            surfaceTexture.setDefaultBufferSize(it.resolution.width, it.resolution.height)
            it.provideSurface(Surface(surfaceTexture), cameraExecutor, Consumer {})
        }

crash:
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x660
Cause: null pointer dereference

backtrace:
#00 pc 00000000000e41b8 /apex/com.android.runtime/lib64/bionic/libc.so (pthread_mutex_lock) (BuildId: 5812256023147338b8a9538321d4c456)
#1 pc 000000000039d060 /system/lib64/libhwui.so (android::SurfaceTexture::detachFromContext()+64) (BuildId: 6e92c400e69e5edfa313569de08cd930)
#2 pc 000000000016a420 /system/lib64/libandroid_runtime.so (android::SurfaceTexture_detachFromGLContext(_JNIEnv*, _jobject*)+80) (BuildId: e5b25f8fb9f6bb45ccbeca8c07061dad)
#3 pc 000000000028dc6c /system/framework/arm64/boot-framework.oat (art_jni_trampoline+124) (BuildId: cb00916f88c36b463e3b56b54e52d4229c505963)
#4 pc 0000000000136334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: ccd73e8ae9b59d5596b3b8aeef234d43)

Support multiple orientations

Currently the plugin does only support portrait mode.
Would supporting multiple orientations be worth the effort?

Replace FlutterActivity with general Activity

I'm trying to use local_auth and this lib in the same project but in order to use local_auth I must change FlutterActivity to FlutterFramentActivity and when I do that I can't build the app cause I end up with an error just like this AmolGangadhare/flutter_barcode_scanner#128. Fortunately someone has suggested how to solve the problem in the other lib, you can find the solution in this issue AmolGangadhare/flutter_barcode_scanner#211

I really need fast_barcode_scanner cause it's the only scanner that reads the type of barcode I need. Thanks in advance!

Android api < 23

Hello, thank you for the package. I wanted to ask will the package work on android API <23? if I lower it to 21.
Thank you

iOS pause / resume detector

Hey me again lol

I'm using continuous scanning, but when the barcode is not known, I'm pushing a new screen to register the product.
So I want to pause the detection while the screen is on top of the scanner.

So I'm using await CameraController.instance.resumeDetector(); and await CameraController.instance.pauseDetector();

No issues on Android, but on iOS the detection is not paused at all.

Hot Restart generate exception

Another problem I noticed, is that in debug when calling Hot Reload with the camera open, I wait for the event end and when trying to open the camera again I get the following: PlatformException (PlatformException(ALREADY_INITIALIZED, Camera is already initialized, null, null)).

I believe it is the dispose() call that is not being made in this case, because when to close and open the camera again, it works normally.

Error: Camera is already initialized

I copied the example code from the update-config branch into a new project with a bottom navigation bar. When switching tabs, I get both camera initialization and camera dispose errors.

I have included a sample main class for your review. So far, I have not figured out the root cause of the issue.

You should be able to just replace your main and replicate the issue. Please let me know if you need more information on this.

main.dart.zip

Implement updateConfiguration method

The dart code already contains this method, it's just the native side that needs to be implemented.

The main issue is how the configuration will be honored when changing the camera.
I suggest trying to do a 'best effort', by replicating the original config as closely as possible.

Maybe we should generalize the idea and allow changing the configuration as a whole (fps, types, cam position, etc.)

Edit: Work-in-progress branch: #17

Crash on Access Deny

I am getting the following crash on access deny. I think this could be worked around by checking for access before displaying the widget, but the error is occurring. Unfortunately, this is the only log that I have:

$s20fast_barcode_scanner13BarcodeReaderC15textureRegistry9arguments12codeCallbackACSo014FlutterTextureG0_p_AA9StartArgsVySaySSGctKcfcTf4ggnn_n + 4560

Return box coordinates of scanned codes

Hello,
I'm very pleased with this plugin. One thing that is missing for us is the ability to paint boxes around the scanned codes from the camera. I know MLKit reports the coordinates of the scanned codes, would it be possible to report coordinates along with the barcode values?

Thank you!

Please update kotlin version in gradle to latest 1.5.30(development branch)

: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
e: /Users/xx/.gradle/caches/transforms-2/files-2.1/1519caaecc29bca0884153c212aa7c94/jetified-kotlin-stdlib-common-1.5.21.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
e: /Users/xx/.gradle/caches/transforms-2/files-2.1/41cc72267ca75397ebfff8df7400373f/jetified-kotlin-stdlib-1.5.21.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.

Please update kotlin version in gradle to latest 1.5.30

iOS crash

I have the scanner inside a TabBarView, when a Product is scanned I popup a screen above the scanner, when the user go back to the scanner the app crash with this stack trace:

2021-10-18 14:18:37.777571+0200 Runner[288:8786] TIC Read Status [14:0x0]: 1:57
2021-10-18 14:18:37.778140+0200 Runner[288:8786] TIC Read Status [14:0x0]: 1:57
"iOS => call startHeadlessService, playerId 4b77f83e-b4bb-4be2-8b18-b7672caff97a"
"calling start headless service (\n    \"-6035574777829228503\"\n)"
"iOS => call play, playerId 4b77f83e-b4bb-4be2-8b18-b7672caff97a"
""
2021-10-18 14:18:49.905068+0200 Runner[288:8419] [avas] AVAudioSession.mm:1079:-[AVAudioSession setActive:withOptions:error:]: Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session.
"Error configuring audio session: Error Domain=NSOSStatusErrorDomain Code=560030580 \"(null)\""
2021-10-18 14:18:54.250574+0200 Runner[288:8419] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCaptureMetadataOutput setMetadataObjectTypes:] Unsupported type found - use -availableMetadataObjectTypes'
*** First throw call stack:
(0x1c82fb180 0x1c74d39f8 0x1ce3a63b4 0x103559868 0x10355ec48 0x10355c980 0x1041157f8 0x103c61f00 0x103f6d5f0 0x103f1239c 0x103f15994 0x1c828d554 0x1c828d284 0x1c828cab8 0x1c8287a08 0x1c8286fb4 0x1ca48879c 0x1f4b13c38 0x100e6a59c 0x1c7d4a8e0)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCaptureMetadataOutput setMetadataObjectTypes:] Unsupported type found - use -availableMetadataObjectTypes'
terminating with uncaught exception of type NSException

So I guess there is an issue when pushing a screen on top of the scanner and pop it after.
Hope the stack helps, it's a big problem to me as it's a native crash.

Access to camera

In my app, I need access to the camera to take a picture and I also need to scan a bar code in the same app. When I use the standard camera package, this stops the fast_barcode_scanner working because (I think), the camera package takes over the camera.

Is there a way of exposing the camera controller so that it could be used to take a picture in a separate tab/page?

Thanks

Compile error with Android (CheckAarMetadataWorkAction)

Hi! First of all, thank you for this package which looks very promising.

Unfortunately, I get a compile error with Android (I cannot try with iOS) which I include below. Do you have any idea where this comes from? It looks like an android minimum version requirement (which I have set to 21 as specified in the README), but I have no idea what to do with it.

EDIT: I am using the stable version 1.1.4, and have the following values inside android/app/build.gradle:

compileSdkVersion 30
...
minSdkVersion 23
targetSdkVersion 30

Thank you for your help.

Launching lib/main.dart on SM G975F in debug mode...
lib/main.dart:1

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Multiple task action failures occurred:
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (31) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-30).
        Dependency: androidx.camera:camera-camera2:1.1.0-alpha10.
        AAR metadata file: /home/jack/.gradle/caches/transforms-2/files-2.1/5797b37d228bf42e43df9ee2bcaaf5b3/jetified-camera-camera2-1.1.0-alpha10/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (31) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-30).
        Dependency: androidx.camera:camera-lifecycle:1.1.0-alpha10.
        AAR metadata file: /home/jack/.gradle/caches/transforms-2/files-2.1/15b9c8755feca49566eac630ade6e94b/jetified-camera-lifecycle-1.1.0-alpha10/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (31) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-30).
        Dependency: androidx.camera:camera-core:1.1.0-alpha10.
        AAR metadata file: /home/jack/.gradle/caches/transforms-2/files-2.1/701c786c451d8b4ff49a0cb1501d5f04/jetified-camera-core-1.1.0-alpha10/META-INF/com/android/build/gradle/aar-metadata.properties.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 13s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

BarcodeCamera widget should dispose CameraController?

Hello,
I've been playing around with the plugin, and it works great so far. I was just wondering when to dispose (if at all) the camera.
I am just using the BarcodeCamera and expected that it would call CameraController.instance.dispose() in the dispose method of the State<BarcodeCamera>, since it also calls initialize?

Are there any drawbacks which would prevent the widget from always dispoing the controller? Should users call it themselves?

thanks,
Herbert

New version requires iOS 11.0

The new version of the package requires iOS 11.0 but the previous version required iOS 10.0.

Is it possible to support for iOS 10.0?

Is it possible to implement zoom function?

Dear Coder,

Is it possible to implement zoom function on the camera to get barcode? I found google ml barcode scanner which has zoom function, when the camera closer to barcode, it reads it way better and faster. Could you help me to implement it? Thanks in advance.

Best regards,

Sueleyman

[iOS] Scanner is very bad at detecting horizontal barcodes on arched objects like bottles

I noticed, that the scanner is not able to detect horizontal barcodes on arched objects with an iPhone. On Android it works perfectly fine but on iOS it sometimes is impossible to detect a barcode. I use the scanner in my production code and I would be very happy if this is fixxed fast.

This image shows an example of an object where it is very hard to scan the barcode:

IMG_20220215_133130 2195

Was trying to use the lib, but running into this error during compilation:

Hi, great lib and i hope to make it work :)
The error i encounter in v 1.0.2

Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.

And

Type mismatch: inferred type is () -> Unit but Consumer<SurfaceRequest.Result!> was expected

Somewhere located in .gradle/caches/transforms-2/

Any idea how to fix this issue?

Error building example app on IOS

I get some errors while building the example app on IOS:

/fast_barcode_scanner-main/fast_barcode_scanner/ios/Classes/Scanner/VisionBarcodeScanner.swift:17:32: error: cannot find 'VNDetectBarcodesRequestRevision2' in scope
                request.revision = VNDetectBarcodesRequestRevision2
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This one also applies to the following types: . dataMatrix, . ean13, . ean8, . itf14, . pdf417, . qr, . upce,

/fast_barcode_scanner-main/fast_barcode_scanner/ios/Classes/types/ScannerConfiguration.swift:79:15: error: type 'VNBarcodeSymbology' has no member 'aztec'
        "aztec": .aztec,
                 ~^~~~~

Regards, Job

DetectionMode.pauseDetection freeze the camera

Good job, this plugin is very good.

I want to pause the detector when a barcode is detected, but without freeze the camera.

I tried with pauseDetection and pauseVideo modes, but both freeze the camera.

[Feature Request]: Limit area of scanning

Description:
The use case for this is to narrow down the area of focus, so blur out the top and bottom of the preview, and have an area in the middle (horizontally) where the barcode scanning can happen. This makes it easier to not scan barcodes that are in the immediate area. Blurring out the top and the bottom of the preview is not an issue, the issue is how to make the scanner only read within a set of pixels, etc.

Maybe onScan can return the coordinates of the scan or similar, and based on this we can implement the check ourselves. This should be possible for both iOS and Android.

I'm not sure what else to add here haha, please let me know if you want more information.

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.