I'm trying to avail Bluetooth features in my Xamarin Forms App to Print on a bluetooth printer but can't get it working.
Even not able to search devices and pair.
I tried below two plugins but none of them works for me.
I tried this example as well:
https://julianocustodio.com/2017/12/07/bluetooth/amp/?__twitter_impression=true
Does anyone have working example?
Any help is much appreciated.
Thanks
@AlessandroCaliaro said:
There is a Sdk for Android
You can creta a Binding with Jar library and try to use it
Otherwise you can try to create an SPP connection with a Bluetooth socket
Thanks @AlessandroCaliaro
Binding with Jar lib worked for me.
Answers
"doesn't work" is very vague. Is it throwing an exception? Not connecting... You could be 99% there and just have a binding issue that keeps the UI from updating the list of available devices.
Your best bet for help is to put your test project in a GitHub repo so others can take a look and spot where you may have gone astray.
are you sure your printer is BLE?
Thanks for quick response.
Just had words with provider and confirmed Bluetooth version. Its 2.0, so obviously its not BLE.
Can you please provide me some snippets of codes to connect with Classic bluetooth and print on a Bluetooth Thermal Printer.
Thanks
Hi @ClintStLaurent ,
I tried below sample project from git and it builds and successfully run on device, but it doesn't find any nearby device.
And obviously paring is yet to see.
https://github.com/juucustodio/Bluetooth-Xamarin.Forms
I also wrote to the author and waiting for his response.
which is the printer?
I also tried this sample, after translating the strings to English. I tried it on my Note 8 and it works. But I am not sure what it is connecting to as I get only MAC Addresses for many of the devices. On Note 8 I often see similar lists with a description that "Name will be displayed once it is connected". And I don't know how to get the MAC Address of the BT devices that I have in hand. I tried with my Jabra earbuds for which the name is displayed. I start the pairing mode and try to connect through this app. The app reports it is connected but the pairing message continues in the earbuds and the phone also doesn't show as if it is connected. But once I refresh the list the Jabra is not listed.
That's my experience. Even I am looking for XF solution for managing BT (LE or not) devices.
> which is the printer?
Sorry for delayed response.
I'm outstation. Here I have attached the full specification of the printer.
Please check it out...
Thanks
You can creta a Binding with Jar library and try to use it
Otherwise you can try to create an SPP connection with a Bluetooth socket
Thanks @AlessandroCaliaro
Binding with Jar lib worked for me.
@RavindraKumar would you mind share how you work with binding JAR to Xamarin forms. I hope you can help me..
Thank you very much
@RavindraKumar could you please share with us how to working with binding JAR to xamarin forms? I wasted for days to find a way to work with bluetooth printer. Thanks
@RavindraKumar ola esou com o mesmo problema, vc poderia postar o codigo com foi feito. Obrigado.
@RavindraKumar Can u please give me suggestion how to start working on bluetooth printer implementing in my Xamarin forms application I found some samples and implemented in my app but not worked and I tried Zebra LinkOS multiplatform plugin but not worked in my app because of Xamarin forms package is 2.3.4.247