Xamarin Forms Bluetooth Receipt Printing

  Рет қаралды 9,451

MrNawshad

MrNawshad

Күн бұрын

Пікірлер
@memesnotmine892
@memesnotmine892 2 жыл бұрын
can i print image on bluetooth printer? like qr code.
@carljohnlopez5425
@carljohnlopez5425 3 жыл бұрын
how do you format the receipt like there's header/body/footer just like a normal receipt? thanks
@byrpa
@byrpa 6 ай бұрын
Should this work for MAUI? What changes need to be made?
@dotnetdevni
@dotnetdevni 3 жыл бұрын
Which printer did u use would this work on ios as well?
@Andres-wo5oi
@Andres-wo5oi Жыл бұрын
magnifico tutorial un saludo desde Chile!.
@poorneshv7532
@poorneshv7532 3 жыл бұрын
You are doing wonderful job by creating these. Thank you very much
@LeeRaybone
@LeeRaybone 3 жыл бұрын
Where do you get the string from for the UUID.from string or is this just a generic string
@MrNawshad
@MrNawshad 3 жыл бұрын
just an UUID Copied from the net.
@AbhishekSingh-vp2qi
@AbhishekSingh-vp2qi 2 жыл бұрын
will it work on IOS, i want it to be in xamarin IOS also
@EdRawrDev5813
@EdRawrDev5813 2 жыл бұрын
Awsome job mate 💀💜💎
@parkwiz2888
@parkwiz2888 2 жыл бұрын
Very nice explained and it is working awesome ! Please help us to print QR code as well.
@anassnassim
@anassnassim 3 жыл бұрын
thank you so much for this great tutorial I have a question if you have some time : can you add a printing image functionality?
@MrNawshad
@MrNawshad 3 жыл бұрын
For printing image, I would recommend you to use the printer's own SDK. I would try to show how it's done at some point. Thanks.
@anassnassim
@anassnassim 3 жыл бұрын
@@MrNawshad thanks to you and i will waiting
@humbertoarciniega1273
@humbertoarciniega1273 3 жыл бұрын
@@MrNawshad Please, I’d really like to know that too, mi printer doesn’t have a sdk for xamarin forms, just for android (Java), I’m starting in xamarin forms and I dont understand how to implement that, I’d really appreciate that
@NikyusOfficial
@NikyusOfficial 3 жыл бұрын
Did you found a way to do it?
@NikyusOfficial
@NikyusOfficial 3 жыл бұрын
@@humbertoarciniega1273 Did you found a way to do it?
@FernandoBravoNogues
@FernandoBravoNogues 3 жыл бұрын
Works like a charm! Thank you!
@kevinsolanoulate2983
@kevinsolanoulate2983 Жыл бұрын
Version xamarin forms?
@komalrakh2879
@komalrakh2879 Жыл бұрын
Can we able to change size of page
@israelceledonio2352
@israelceledonio2352 3 жыл бұрын
thanks for this great tutorial, is it possible to print the images from xamarin without sdk?
@MrNawshad
@MrNawshad 3 жыл бұрын
I m sure it is possible, but I have not been able to achieve that yet. I usually use the printer sdk to do all the image printing. Thanks
@nikitapatil1496
@nikitapatil1496 3 жыл бұрын
does this work on android 10 or higher?
@MrNawshad
@MrNawshad 3 жыл бұрын
Did not test it on android 10 device, but the code should work anyway.
@nikitapatil1496
@nikitapatil1496 3 жыл бұрын
@@MrNawshad It is not working for me on android 10. getting socket closed exception
@MrNawshad
@MrNawshad 3 жыл бұрын
Have a look at this issue stackoverflow.com/questions/61060967/android-10-bluetooth-connection
@parkwiz2888
@parkwiz2888 2 жыл бұрын
Hello Friend, If you can help me to print multiple line. as now it is printing continue. Pls help.
@Anandkumar-eb6mu
@Anandkumar-eb6mu 3 жыл бұрын
for me the binding command is not triggering and also options are not loaded because of binding whats the reason?
@MrNawshad
@MrNawshad 3 жыл бұрын
Did you bind your viewmodel from the view????
@Anandkumar-eb6mu
@Anandkumar-eb6mu 3 жыл бұрын
@@MrNawshad ok i got my mistake, i binded wrong model.... thanks man very much
@clarkbrown4365
@clarkbrown4365 3 жыл бұрын
I created this project and tested on my device paired to bluetooth printer. after select printer, click print, it prints the first time, if I click print again, it does not print , I can exit the app and start again, sometimes it prints, someitmes does not.
@MrNawshad
@MrNawshad 3 жыл бұрын
It's because the printer job overload. This tutorial is for education purpose. In real world application, you have to to wait until the printer job is finished and then send the next printer command. So basically you disable the print button at the beginning and enable is later after the job is finished. Alternatively, have a look at how to handle tasks in background threads. Thanks.
@biswajitpal9082
@biswajitpal9082 3 жыл бұрын
It's not print the Arabic letters.. I have tried with all Encoding.UTF8, Encoding.Unicode and Encoding.ASCII. please help me
@geraldopereira9536
@geraldopereira9536 3 жыл бұрын
Ótimo vídeo meu amigo, fiz tudo igualzinho e funciona bem, porém se coloco um texto grande ele não imprime mais que 3 linhas poderia me ajudar?
@dineshkumaraguru3721
@dineshkumaraguru3721 Жыл бұрын
this bluethoothadaptet, not working in Xamarin froms ios,
@gerardolopezibanez7980
@gerardolopezibanez7980 3 жыл бұрын
how to print line spacing
@ibrtech7183
@ibrtech7183 3 жыл бұрын
Hello can i get the source code or you github's account?
@dineshkumaraguru3721
@dineshkumaraguru3721 Жыл бұрын
i need a ios also, can you , please share the source
@jaimemoran7245
@jaimemoran7245 2 жыл бұрын
excelente video, como puedo imprimir imagen por bluetooth??, saludos
@koliroian2650
@koliroian2650 2 жыл бұрын
can I do this for Arabic character
@checox1909
@checox1909 2 жыл бұрын
Repo??
@AdlerwebMX
@AdlerwebMX 3 жыл бұрын
Hi MrNawshad, I have a two problems in the file IBlueToothServices.cs Error CS0501 'IBluetoothService.GetDeviceList ()' must declare a body because it was not marked as abstract, external or partial C:\Development\xmrPrinter\xmrPrinter\xmrPrinter\xmrPrinter\IBluetoothService.cs 9 Error CS0501 'IBluetoothService.Print (string, string)' must declare a body because it was not marked as abstract, external or partial C:\Development\xmrPrinter\xmrPrinter\xmrPrinter\xmrPrinter\IBluetoothService.cs 10 I not found the solution to this problem, can you help me please?
@MrNawshad
@MrNawshad 3 жыл бұрын
I guess you haven’t linked the dependency. Please watch the video on android implementation. Thanks
@sahdevsiddhu5692
@sahdevsiddhu5692 3 жыл бұрын
Can you provide this code
@diegoliterat2240
@diegoliterat2240 3 жыл бұрын
Hi, thanks for the video. I have a question, I need to print text and qr code. Do you know how can I do this? Thanks
@MrNawshad
@MrNawshad 3 жыл бұрын
public static readonly byte[] QR_CODE = new byte[] { 0x1B, 0x5A, 0x00, 0x02, 0x06, 0x17, 0x00 }; pass this byte array before printing your text.
@diegoliterat2240
@diegoliterat2240 3 жыл бұрын
@@MrNawshad Thanks. I solved with the Esc/POS _Net library. I need to implement USB and/or Bluetooth printer on UWP but without the dialogue. (Pos printer) do you know any way to get the printer and call to write method?
@pn_slender1408
@pn_slender1408 3 жыл бұрын
does this work with any bluetooth printer?
@MrNawshad
@MrNawshad 3 жыл бұрын
It should work with any generic Bluetooth printer.
@varshapatil8229
@varshapatil8229 3 жыл бұрын
pls do tutorial on print a QR code.
@NikyusOfficial
@NikyusOfficial 3 жыл бұрын
Did you found a way to do it?
@varshapatil8229
@varshapatil8229 3 жыл бұрын
@@NikyusOfficial yes.i got it
@varshapatil8229
@varshapatil8229 3 жыл бұрын
@@NikyusOfficial pls give ur email id
@NikyusOfficial
@NikyusOfficial 3 жыл бұрын
@@varshapatil8229 I cant send emails here, KZbin doesn't let me, is there any other way, like discord? Instagram? Smth else?
@NikyusOfficial
@NikyusOfficial 3 жыл бұрын
@@varshapatil8229 Please
@sahdevsiddhu5692
@sahdevsiddhu5692 3 жыл бұрын
its not working
@MrNawshad
@MrNawshad 3 жыл бұрын
whats the error message that you get???
@orangegamerdot
@orangegamerdot 3 жыл бұрын
@@MrNawshad When I select to device on picker , error message ; Java.Lang.NullPointerException: 'Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference'
@MrNawshad
@MrNawshad 3 жыл бұрын
You have to try this app on a real device. If you run the code on emulator it’s going to give you null pointer exception.
@orangegamerdot
@orangegamerdot 3 жыл бұрын
@@MrNawshad in fact I try on a real device. My device is goojprt MTP-3
@bliitzeg
@bliitzeg 3 жыл бұрын
How can I print a QR code?
@MrNawshad
@MrNawshad 3 жыл бұрын
Will do a tutorial soon.
@bliitzeg
@bliitzeg 3 жыл бұрын
@@MrNawshad Cool, thanks.
@NikyusOfficial
@NikyusOfficial 3 жыл бұрын
@@bliitzeg Did you find a fix for this?
@bliitzeg
@bliitzeg 3 жыл бұрын
@@NikyusOfficial No 😢
@nickerpasco4247
@nickerpasco4247 Жыл бұрын
brother, could you teach me how to print a QR code? this is my code : string qrCodeData = Base64CodeQR(); byte[] qrCodeBytes = Convert.FromBase64String(qrCodeData); try { BluetoothSocket bluetoothSocket = device?. CreateRfcommSocketToServiceRecord( UUID.FromString("00001101-0000-1000-8000-00805f9b34fb")); bluetoothSocket?.Connect(); bluetoothSocket?.OutputStream.Write(qrCodeBytes , 0, qrCodeBytes .Length); await Task.Delay(1000); bluetoothSocket.Close() ; } catch(Exception exp) { //Debug.WriteLine(exp.Message); throw exp; } the problem is that it prints as it is base 64 but you have to convert it to image
@sahdevsiddhu5692
@sahdevsiddhu5692 3 жыл бұрын
Hello can i get the source code or you github's account?
@MrNawshad
@MrNawshad 3 жыл бұрын
dotnetmaui.net/xamarin-forms-bluetooth-receipt-printing-fmqzs
@sahdevsiddhu5692
@sahdevsiddhu5692 3 жыл бұрын
@@MrNawshad thanks
@jayp.4100
@jayp.4100 2 жыл бұрын
@@MrNawshad I am excited to build and run this code. Can you please point out to vs2022 project code that can be loaded and run? it would certainly be appreciated.
@JoseRomero-di9dc
@JoseRomero-di9dc 4 ай бұрын
@@MrNawshad no funciona :(
Xamarin Forms Receipt Printing (Tutorial)
9:36
MrNawshad
Рет қаралды 14 М.
Xamarin Forms Print Receipt POS System Integration
7:04
Xamarin Guy
Рет қаралды 10 М.
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН
Sigma girl VS Sigma Error girl 2  #shorts #sigma
0:27
Jin and Hattie
Рет қаралды 124 МЛН
JISOO - ‘꽃(FLOWER)’ M/V
3:05
BLACKPINK
Рет қаралды 137 МЛН
How To Reverse Engineer A Bluetooth Device
11:53
Hacking Modern Life
Рет қаралды 53 М.
Secure Your Xamarin App with Fingerprint or Face Recognition
24:02
Gerald Versluis
Рет қаралды 19 М.
Connectivity (Xamarin.Essentials API of the Week)
6:29
Microsoft Developer
Рет қаралды 13 М.
Plugin.BluetoothClassic for Xamarin. Tutorial. IBluetoothConnection
32:05
Электротехника для программистов :: Практика
Рет қаралды 8 М.
A Deep Dive into JVM Start-Up
22:03
Java
Рет қаралды 30 М.
Xamarin BLE App for latest Android releases (12 and higher)
38:51
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН