simple_barcode_scanner icon indicating copy to clipboard operation
simple_barcode_scanner copied to clipboard

can not scan

Open xzghx opened this issue 2 years ago • 7 comments

Hi, I want to scan some qrCode in android, I get these messages in console and scanner is not returning anything . I tried on android 4 and 12

W/DynamiteModule(30647): Local module descriptor class for com.google.android.gms.vision.dynamite.barcode not found.
I/DynamiteModule(30647): Considering local module com.google.android.gms.vision.dynamite.barcode:0 and remote module com.google.android.gms.vision.dynamite.barcode:0

I'm calling barcode scanner like this:

 ElevatedButton(
                                onPressed: () async {
                                  var res = await Navigator.push(
                                      context,
                                      MaterialPageRoute(
                                        builder: (context) =>
                                            const SimpleBarcodeScannerPage(
                                              scanType: ScanType.qr,
                                            ),
                                      ));
                                  setState(() {
                                    if (res is String) {
                                      _serialNumber = res;
                                    }
                                  });
                                },
                                child: Text('scan')),

xzghx avatar Mar 23 '23 12:03 xzghx

should work @xzghx , will check and update, can you post what kind of qr you are scanning, if possible attach the qrcode as well

CodingWithTashi avatar Mar 24 '23 16:03 CodingWithTashi

Sure, this is my sample qr : qr

xzghx avatar Mar 28 '23 11:03 xzghx

@xzghx did you solve the problem?

iulianxpopa avatar Apr 19 '23 08:04 iulianxpopa

@iulianxpopa no I couldn't scan the code.

xzghx avatar Apr 19 '23 09:04 xzghx

@iulianxpopa and @xzghx I have tested with below code in android 10 and It is working fine (GIF below).

 ElevatedButton(
              onPressed: () async {
                var res = await Navigator.push(
                    context,
                    MaterialPageRoute(
                      builder: (context) => const SimpleBarcodeScannerPage(
                        scanType: ScanType.qr,
                      ),
                    ));
                setState(() {
                  if (res is String) {
                    result = res;
                  }
                });
              },
              child: const Text('Open qr scanner'),
            ),

Please share us the detail with android/ios version you are testing

CodingWithTashi avatar Apr 23 '23 05:04 CodingWithTashi

@CodingWithTashi this is some more logs

W/DynamiteModule(15981): Local module descriptor class for com.google.android.gms.vision.barcode not found.
I/DynamiteModule(15981): Considering local module com.google.android.gms.vision.barcode:0 and remote module com.google.android.gms.vision.barcode:0
E/Vision  (15981): Error loading optional module com.google.android.gms.vision.barcode: com.google.android.gms.dynamite.DynamiteModule$LoadingException: No acceptable module found. Local version is 0 and remote version is 0.
W/DynamiteModule(15981): Local module descriptor class for com.google.android.gms.vision.dynamite.barcode not found.
I/DynamiteModule(15981): Considering local module com.google.android.gms.vision.dynamite.barcode:0 and remote module com.google.android.gms.vision.dynamite.barcode:0
W/DynamiteModule(15981): Local module descriptor class for com.google.android.gms.vision.barcode not found.

xzghx avatar Apr 27 '23 18:04 xzghx

@xzghx Try checking Google Play Services is installed (install Google Play Store if not)

Google Play Services include Mobile Vision API which is required for com.google.android.gms.vision.barcode

tomlumachain avatar Jul 27 '23 03:07 tomlumachain