Bluetooth print

66 views
Skip to first unread message

zanetti....@gmail.com

unread,
Aug 3, 2018, 7:48:57 PM8/3/18
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: Eclipse
Android 
Device

hello I have doubts to make impression via bluetooth, how could I do?

Bluetooth bt = new Bluetooth();String UUID = "00001101-0000-1000-8000-00805f9b34fb";bt.write(new ActionListener() {@Overridepublic void actionPerformed(ActionEvent evt) {????????}}, "00:02:5B:B4:C5:32", UUID, UUID, UUID, true);

Shai Almog

unread,
Aug 4, 2018, 12:53:06 AM8/4/18
to CodenameOne Discussions
Hi,
I'm not sure what that code is referring to. Did you see this: https://github.com/chen-fishbein/bluetoothle-codenameone/

zanetti....@gmail.com

unread,
Aug 4, 2018, 10:18:58 AM8/4/18
to CodenameOne Discussions

my question and how do I print a text on the printer esc / pos.

Shai Almog

unread,
Aug 5, 2018, 12:17:51 AM8/5/18
to CodenameOne Discussions
It's not something we've done. Personally if I wanted to print I'd port this plugin: https://github.com/katzer/cordova-plugin-printer
It's pretty easy to port a cordova plugin, in fact the bluetooth plugin I listed is also a ported cordova plugin.

zanetti....@gmail.com

unread,
Aug 5, 2018, 5:12:42 PM8/5/18
to CodenameOne Discussions


Hello, how do I import this? for later to make the impression would be in code codenameone or in cordova?

Shai Almog

unread,
Aug 6, 2018, 12:11:38 AM8/6/18
to CodenameOne Discussions
Hi,
in Codename One. You need to convert the plugin in a similar way to the bluetooth plugin. See the code and docs of the bluetooth plugin, it was also based on a cordova plugin which Chen ported.

cristiano zanetti

unread,
Aug 6, 2018, 7:41:31 AM8/6/18
to codenameone...@googlegroups.com

Olá, desculpe minha ignorância pouco conhecimento codenameone, como portar o plugin Cordova?


2018-08-06 1:11 GMT-03: 00 Shai Almog < shai....@gmail.com > :
Oi
no Codename One. Você precisa converter o plugin de forma semelhante ao plugin bluetooth. Veja o código e documentação do plugin bluetooth, ele também foi baseado em um plugin cordova que Chen portou.

-
Você recebeu esta mensagem porque está inscrito em um tópico no grupo "CodenameOne Discussions" dos Grupos do Google.
Para cancelar a inscrição neste tópico, visite https://groups.google.com/d/ topic / codenameone-discussions / JQnIrne1EZI / unsubscribe .
Para cancelar a inscrição neste grupo e em todos os seus tópicos, envie um email para codenameone-discussions + unsub...@googlegroups.com .
Visite este grupo em https://groups.google.com/ group / codenameone-discussions .
Para ver esta discussão na Web, visite https://groups.google.com/d/ msgid / codenameone-discussions / 55ac302c-7a32-48ce-a507-7c1e0df4fd8 % 40googlegroups. com .

Para obter mais opções, visite https://groups.google.com/d/ optout .



--

zanetti....@gmail.com

unread,
Aug 6, 2018, 7:43:56 AM8/6/18
to CodenameOne Discussions

hello, sorry my ignorance little codenameone knowledge, how to port the cordova plugin?

Shai Almog

unread,
Aug 7, 2018, 12:32:05 AM8/7/18
to CodenameOne Discussions
Hi,
I don't think we have an explicit tutorial for that but we have a high level overview of our compatibility here: https://www.codenameone.com/blog/phonegap-cordova-compatibility-for-codename-one.html

This article is a bit old so some things improved since it was written. You can use the bluetooth cn1lib https://github.com/chen-fishbein/bluetoothle-codenameone/ as a reference and ask questions here if you run into an issue.
Reply all
Reply to author
Forward
0 new messages