I am using flutter package
barcode_scan: any
for scanning barcode using my scanner to record data using flutter desktop support, but this extension asking me for camera even i have scanner to scan barcode
code sample that i am using.
ScanResult barcodez = await BarcodeScanner.scan();
setState(() {
barcode = barcodez as String;
});
}```
Hello barcode_Scanner only works with android and iOS, It is written in the packages details.
Also the package is made undertaking the camera feature and not the actually barcode scanner.
Related
I'm using the Flutter barcode scanner. What I'm able to achieve is like
But what I need is like this.
Same question was asked here. How to make a customised QR Code Scanner using Flutter?. But I want to customize using the same Flutter barcode scanner package. Can anyone help me with this.
My code is
String barcodeScanRes = await FlutterBarcodeScanner.scanBarcode(
'#00FFB6',
'Exit',
true,
ScanMode.QR,
);
You can use qr_code_scanner 1.0.1 which give you ability to customize your scanner as shown below
How can disable QR code and scan only bar code type in flutter. In flutter bar code it is also scanning QR code then can disable QR code scanning
I have tried with scanner package but it is scanning QR code with bar code. I want to scan only qr code
try this package for both QR code and barcode ai_barcode
I am trying to implement badger count on app launcher icon in flutter for all android based devices. I've tried flutter_app_badger and flutter_dynamic_icon as well but both of them aren't compatible with android. I wan't a unamious solution it's awesome if it works both for android or ios as well.
I am trying to find solutions but there isn't enough data present. Onesignal push notification I am using for the app provides default badge count but it's not in all devices either.
Please help me with the situation.
setLauncherNumber()async{
// set batch number
try {
print('LauncherBadge inside try');
// FlutterAppBadger.updateBadgeCount(10);
await FlutterDynamicIcon.setApplicationIconBadgeNumber(93);
print('LauncherBadge Success');
} catch (e) {
print('LauncherBadge error $e');
}
}
flutter_app_badger and flutter_dynamic_icon arent compatible with all devices
Use this package flutter_app_badger: ^1.5.0
import 'package:flutter_app_badger/flutter_app_badger.dart';
FlutterAppBadger.updateBadgeCount(1);
I have a problem with gps management in a flutter application.
I've seen in this answer:
Is GPS activated - Flutter
how I can check if a gps is active in a flutter app.
If is not active (GeolocationStatus.denied) how can I take with flutter a user to device settings for turn on gps?
Thank you.
Install plugin :
https://pub.dartlang.org/packages/android_intent#-installing-tab-
Import in your dart :
import 'package:android_intent/android_intent.dart';
Add method :
void openLocationSetting() async {
final AndroidIntent intent = new AndroidIntent(
action: 'android.settings.LOCATION_SOURCE_SETTINGS',
);
await intent.launch();
}
Invoke it done...
I am trying to develop a barcode scanner for google glass (don't judge) using the ZXing library.
Scanning QR-Codes works perfectly fine, but I can't scan any 1D-barcodes.
This is my code:
Intent intent = new Intent(this, CaptureActivity.class);
//intent.putExtra("SCAN_MODE", "PRODUCT_MODE"); //doesn't work with or without this line
startActivityForResult(intent, SCAN_REQUEST);
Here is an example (EAN-8):
Scanning this with a scanner from the PlayStore works on my phone, but not using my app on the glass.
I found a workaround for my problem in the DecodeRunnable.java.By adding BarcodeFormat.EAN_8 to the list in the code below I was able to scan the barcode.
DecodeHandler() {
hints = new EnumMap<>(DecodeHintType.class);
hints.put(DecodeHintType.POSSIBLE_FORMATS,
Arrays.asList(BarcodeFormat.AZTEC, BarcodeFormat.QR_CODE, BarcodeFormat.DATA_MATRIX));
}
You are wellcome to post your answers, because I believe there is a better way to solve this.