I am developing a flutter mobile app , I need to implement a Bluetooth thermal printer, So I have added flutter_blue package, and using esc_pos_utils 1.0.0 for generating byte code but I am not getting way how can I use byte code with flutter_blue package, I have used esc_pos_bluetooth, but problem is, it not detecting device in some mobile, If flutter_bluetooth_serial: ^0.2.2 can use for that will also use cause flutter_blue and flutter_bluetooth_serial are working well for detecting device in almost every mobile.
Also I have used bluetooth_print , it working better then esc_pos_bluetooth in detecting mobile device but it is using LineText widget which not good for generating receipt,
Please help me out
Related
I'm trying to configure NFC in flutter and find a Near by Device using it and while tapping the two devices the text Message should be shared from one device to Another
couldn't able to find any Perfect Example or a Tutorial regarding my requirement any docs or sample code will be really helpful
To share a text between two mobile devices use Flutter NFC, you can use the flutter_nfc_kit package, which provides a simple and easy-to-use API for working with NFC in Flutter.
**ExampleCode:
Add the flutter_nfc_kit package to your dependencies in your pubspec.yaml file.**
**Initialize the NFC module in your main function:
NFC.instance.start();
NFC.instance.share("Your message here");
**NFC.instance.onShareSuccess.listen((event) { print(event.shareData); });
NFC.instance.isAvailable**
I try to send some data String or binary from my Application N°1 from devis N°1 to the same Application from My devis N°2.
I search and i search and there is no good tutorial who explain step by step how to use bluetooth in flutter, there is only COPY/PAST without any explication and i found much undeclared variable...
the flutter_blue not show my smartphone devis but the flutter_bluetooth_serial show me the devis (I use the exemple code but i dont know how it work) so i dont know how i Add this devis and how i send data from this devis...
by the way can i use JAVA code ? the old java android programming because i know how use bluetooth in the old Android application but with flutter i dont found any good tutorial.
I am new to flutter.
I came across flutter_bluetooth_serial it works only for android ..please suggest
One suggestion could be to use Android ;-) Howsoever, flutter_bluetooth_serial implementation uses Classical Bluetooth and here we enter the land of Apples MFI (Made for iPhone/iPod/iPad) licensing programme . This is the reason for the lack of support in libraries like flutter.
I suggest using another interface with fewer restrictions, for example Bluetooth LE.
I am a flutter developer, I want to make an application to exchange messages and files by using NFC technique
I used nfc_in_flutter plugin for reading and writing NFC tags but I don't know how to send and receive data and files between devices by using NFC in flutter.
Could any one help me, please?
Generally you don't try and send data between 2 devices using NFC, there is a standard for it, but most devices don't support it (it has never been supported on iOS and Android has dropped support for it as it was unreliable)
Use Bluetooth or Wifi Direct instead.
Update:
If you have to use NFC then the nfc_in_flutter plugin is no use, you are going to have to call native code for each platform yourself / write your own plugin.
And for 2 iOS devices, then forget it, just not possible because of what the OS supports.
When one device is an Android there is a complicated method that some people have had some success with but it still has it's issue.
The Android device does Host Card Emulation (HCE) and pretends to be a really Type 4 NFC tag, then other devices can read/write to it as if it were a real Tag which both iOS and Android Support. BUT on older Android devices then the deprecated Android Beam might get in the way and you would need to use enableReaderMode to do the read/write on Android.
You will need to put in a lot of error handle in the read/write App as NFC comms is very slow and very prone to loosing the connection, so it would have to handle loosing the connection and restarting where it last successful read from/written to.
All these problems make this extremely difficult to achieve a workable solution and was the main reason Google removed Android Beam for Android to Android sharing (which does use a NFC peer to peer protocol)
Is there any way that I can print a receipt on a Bluetooth thermal printer, as I really struggling finding the solution on flutter? Anything could help, I really appreciate those answers
I have tried esc_pos_bluetooth package and it's not working for Bixolon bluetooth printer.
I'v found blue_thermal_printer library and it worked for me on Android but this library doesn't support iOS until now:
https://pub.dev/packages/blue_thermal_printer
Currently you need to write your own logic using Bluetooth packages.
There is package available which currently supports WiFi POS printer.
Take a look
https://pub.flutter-io.cn/packages/esc_pos_printer
Have you tried this package: esc_pos_bluetooth(https://github.com/andrey-ushakov/esc_pos_bluetooth)?
Not much luck on my end either (on ios). Unfortunately, esc_pos_bluetooth doesn't detect my Epson TM-T88VI so that's a little bit of a road block...
There are three major bluetooth printing plugins, i have tried them all and so far this package is the best one esc_pos_bluetooth is the best on my case.
Some useful Flutter SDKs for Thermal Printer:
bluetooth_thermal_printer - This is a Flutter plugin that allows you to use a Bluetooth thermal printer on Android device.
blue_print_pos - This is a Flutter plugin that enables you to use a
POS (point of sale) system on both Android and iOS device.
This is the updated forked blue_print_pos SDK which I used in Dec, 2022. You can use it without facing any issues.
How to integrate SDK: Detailed Stackoverflow Answer