esc_pos_bluetooth
esc_pos_bluetooth copied to clipboard
Printer Scann not Working in Android 11
Device list is empty in OPPO Reno 5. Run Android 11. No detect printer at all. Haven't try at other android 11 device yet.
But work well in my old Redmi note 3, with Android 6.
Please update
Device list is empty in OPPO Reno 5. Run Android 11. No detect printer at all. Haven't try at other android 11 device yet.
But work well in my old Redmi note 3, with Android 6.
Please update
I face same problem i fix it by change compileSdkVersion & targetSdkVersion (android/app/build.gradle) from 30 to 28 and the devices list to me
Hi, I was facing the same problem. It turns out that GPS location should be enabled in order to discover nearby devices. Enabling GPS worked for me.
In android documentation its mentioned that "Services running on Android 10 and higher cannot discover Bluetooth devices unless they have the ACCESS_BACKGROUND_LOCATION permission. For more information on this requirement, see Access location in the background.". Reference can be found here
I face same problem. I have try in VIVO, Samsung android V.10 - V11
Eu enfrento o mesmo problema. Eu tentei no VIVO, Samsung android V.10 - V11
even activating the GPS did not work?
Same here, even with gps active.
This plugin is showing many errors, I advise you to change
Do you sugest one ?
Hi I have same error but I fixed . A added below peermission Manifest.xml
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
then When I opened select printer page , I will check permission and then all printers will be shown. await Permission.locationAlways.request().isGranted;
printerManager.scanResults.listen((devices) async {
// print('UI: Devices found ${devices.length}');
setState(() {
_devices = devices;
});
});
_startScanDevices();
I tried @tehsunnliu and @ozhankucuk both suggestions. But still not working in my phone. I have redmi note 9 with MIUI 12.0.1 and android 11. Build app with unsound null safety and app was of size 47mb!!! Please someone help guys. I have this printer and have to make it work.
I've been working on a package, I don't know if it suits you but for me it worked but on Android you need to first pair with the printer and only then it will show in the list https://github.com/renanzdm/pos_printer_manager_forked
@renanzdm hey thank you for the reply. Yes i have paired the device and its working fine in Rawbt app. But not showing in mine.
using which package? what i sent or esc pos bluetooth
@renanzdm thanks a lot to you man! your repo worked for me! Now I just need your help to print qr codes and usual normal texts instead of html. Thanks a lot!!
with this project you will need to build everything using HTML from qrCode to plain text as it does an HTML conversion to a page and then prints it
@renanzdm yeah i understood that. But can you guide me how to do it without html too? like normal text?
I don't understand your question, as the package is transforming the html into an image you would have to transform the text into an image too
My point is, I will have to write html in order to use your package. What if i want to do something simple than that? For this i have to write a code that would take inputs from the text field generate a html than convert it to image and than it will print.
Yes always with html. because of text formatting and other things that just plain text wouldn't look good
You can create methods and create an html for you and you just insert the text you want
@renanzdm cool sounds like an alternative! thanks man!
After tons of trial and errror, finally made it work on the example app with targetSdkVersion 30, based on clues given in this issue (location permission needed), thanks!
hope this will help:
android/app/build.gradle:
android/app/src/main/AndroidManifest.xml
main.dart:
@howmun Thank you very much :)