In this video, we will be learning how to print a receipt to a bluetooth printer from Xamarin forms Android application. Like, Share and Subscribe! #xamarinForms ##xamarin #andorid #ios #dotnet #mobile
КОМЕНТАРІ: 75
@poorneshv75322 роки тому
You are doing wonderful job by creating these. Thank you very much
@FernandoBravoNogues2 роки тому
Works like a charm! Thank you!
@parkwiz2888Рік тому
Very nice explained and it is working awesome ! Please help us to print QR code as well.
@Andres-wo5oi6 місяців тому
magnifico tutorial un saludo desde Chile!.
@carljohnlopez54252 роки тому
how do you format the receipt like there's header/body/footer just like a normal receipt? thanks
@dotnetdevni2 роки тому
Which printer did u use would this work on ios as well?
@anassnassim2 роки тому
thank you so much for this great tutorial I have a question if you have some time : can you add a printing image functionality?
@MrNawshad2 роки тому
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.
@anassnassim2 роки тому
@@MrNawshad thanks to you and i will waiting
@humbertoarciniega12732 роки тому
@@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
@NikyusOfficial2 роки тому
Did you found a way to do it?
@NikyusOfficial2 роки тому
@@humbertoarciniega1273 Did you found a way to do it?
@memesnotmine892Рік тому
can i print image on bluetooth printer? like qr code.
@EdRawrDev5813Рік тому
Awsome job mate 💀💜💎
@geraldopereira95362 роки тому
Ó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?
@israelceledonio23522 роки тому
thanks for this great tutorial, is it possible to print the images from xamarin without sdk?
@MrNawshad2 роки тому
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
@LeeRaybone2 роки тому
Where do you get the string from for the UUID.from string or is this just a generic string
@MrNawshad2 роки тому
just an UUID Copied from the net.
@AbhishekSingh-vp2qiРік тому
will it work on IOS, i want it to be in xamarin IOS also
@jaimemoran7245Рік тому
excelente video, como puedo imprimir imagen por bluetooth??, saludos
@gerardolopezibanez79802 роки тому
how to print line spacing
@kevinsolanoulate298311 місяців тому
Version xamarin forms?
@komalrakh2879Рік тому
Can we able to change size of page
@parkwiz2888Рік тому
Hello Friend, If you can help me to print multiple line. as now it is printing continue. Pls help.
@clarkbrown43652 роки тому
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.
@MrNawshad2 роки тому
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.
@dineshkumaraguru37216 місяців тому
this bluethoothadaptet, not working in Xamarin froms ios,
@Anandkumar-eb6mu2 роки тому
for me the binding command is not triggering and also options are not loaded because of binding whats the reason?
@MrNawshad2 роки тому
Did you bind your viewmodel from the view????
@Anandkumar-eb6mu2 роки тому
@@MrNawshad ok i got my mistake, i binded wrong model.... thanks man very much
@biswajitpal90822 роки тому
It's not print the Arabic letters.. I have tried with all Encoding.UTF8, Encoding.Unicode and Encoding.ASCII. please help me
@ibrtech71832 роки тому
Hello can i get the source code or you github's account?
@nikitapatil14962 роки тому
does this work on android 10 or higher?
@MrNawshad2 роки тому
Did not test it on android 10 device, but the code should work anyway.
@nikitapatil14962 роки тому
@@MrNawshad It is not working for me on android 10. getting socket closed exception
@MrNawshad2 роки тому
Have a look at this issue stackoverflow.com/questions/61060967/android-10-bluetooth-connection
@sahdevsiddhu56922 роки тому
Can you provide this code
@dineshkumaraguru37216 місяців тому
i need a ios also, can you , please share the source
@koliroian2650Рік тому
can I do this for Arabic character
@varshapatil82292 роки тому
pls do tutorial on print a QR code.
@NikyusOfficial2 роки тому
Did you found a way to do it?
@varshapatil82292 роки тому
@@NikyusOfficial yes.i got it
@varshapatil82292 роки тому
@@NikyusOfficial pls give ur email id
@NikyusOfficial2 роки тому
@@varshapatil8229 I cant send emails here, UKposts doesn't let me, is there any other way, like discord? Instagram? Smth else?
@NikyusOfficial2 роки тому
@@varshapatil8229 Please
@diegoliterat22402 роки тому
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
@MrNawshad2 роки тому
public static readonly byte[] QR_CODE = new byte[] { 0x1B, 0x5A, 0x00, 0x02, 0x06, 0x17, 0x00 }; pass this byte array before printing your text.
@diegoliterat22402 роки тому
@@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?
@checox1909Рік тому
Repo??
@pn_slender14082 роки тому
does this work with any bluetooth printer?
@MrNawshad2 роки тому
It should work with any generic Bluetooth printer.
@sahdevsiddhu56922 роки тому
its not working
@MrNawshad2 роки тому
whats the error message that you get???
@orangegamerdot2 роки тому
@@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'
@MrNawshad2 роки тому
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.
@orangegamerdot2 роки тому
@@MrNawshad in fact I try on a real device. My device is goojprt MTP-3
@bliitzeg2 роки тому
How can I print a QR code?
@MrNawshad2 роки тому
Will do a tutorial soon.
@bliitzeg2 роки тому
@@MrNawshad Cool, thanks.
@NikyusOfficial2 роки тому
@@bliitzeg Did you find a fix for this?
@bliitzeg2 роки тому
@@NikyusOfficial No 😢
@AdlerwebMX2 роки тому
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?
@MrNawshad2 роки тому
I guess you haven’t linked the dependency. Please watch the video on android implementation. Thanks
@nickerpasco42478 місяців тому
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
@sahdevsiddhu56922 роки тому
Hello can i get the source code or you github's account?
@@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.