Giter Club home page Giter Club logo

Comments (4)

itsAyyazdev avatar itsAyyazdev commented on June 2, 2024 1

you can use this one until the fix is merged

flutter_barcode_scanner: git: url: https://github.com/itsAyyazdev/flutter_barcode_scanner.git

from flutter_barcode_scanner.

joselcv avatar joselcv commented on June 2, 2024

I just verified that this error is because in the MainActivity.tk file the class has FlutterFragmentActivity and when it is changed to FlutterActivity it works, however this is a big problem as the other packages like localAuth have been updated and use FlutterFrameActivity, it would be very helpful if you could update the sibling package

This found:
import io.flutter.embedding.android.FlutterActivity

class MainActivity: FlutterActivity() {
}

but this not:
import io.flutter.embedding.android.FlutterFragmentActivity

class MainActivity: FlutterFragmentActivity() {
}

from flutter_barcode_scanner.

joselcv avatar joselcv commented on June 2, 2024

to solve this since I use localAuth and flutterbarcodescanner what I did was that in the file FlutterBarcodeScannerPlugin.java Cambié todas las referencias a flutterActivity a flutterFrameActivity y ahora funciona, sin embargo, cuando presiono cancelar o escaneo un código qr, la consola sigue mostrando constantemente el siguiente mensaje: Camera 1 looking CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client com.samsung.adaptivebrightnessgo API Level 2.

I hope that with all this that I am saying I can contribute so that you can improve the package that is really very useful

from flutter_barcode_scanner.

abdorizak avatar abdorizak commented on June 2, 2024

When I try to use the plugin on ios it works however on android I get:

E/flutter (19227): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method scanBarcode on channel flutter_barcode_scanner).

I am using the latest version of flutter and dart to date I don't know if this has something to do with it, and I'm starting the application on a physical device with android version 11

Samsung galaxy a30s

To Reproduce

  1. install the package
  2. in your method: String barcodeScanRes;
    try {
    barcodeScanRes = await FlutterBarcodeScanner.scanBarcode(
    '#33E9FF', 'Cancel', true, ScanMode.QR);
    VibratorPlugin.checkVibration();
    print(barcodeScanRes);
    } on PlatformException {
    barcodeScanRes = 'Failed to get platform version.';
    }
  3. execute the method.

did you specify the android minSdkVersion and targetSdkVersion also compileSdkVersion?

from flutter_barcode_scanner.

Related Issues (20)

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.