Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Printing From Android to Mobile Bluetooth Printer with PhoneGap

I'm new with PhoneGap but i know that it wraps web applications so that we can access native API's from javascript.

We are using Android as an embedded type of system and want to get it to work with the ADP400 BT printer. This is a compact dotmatrix printer. It seems like a great fit for a mobile device to use as a POS system.

However, I can't find any information on printing from mobile devices to BT printers using javascript.

Some printer manufacturers supply native API's for android, but is it possible to use such libraries from PhoneGap?

Any opinion will be appreciated,

Thanks,

Hakan

like image 657
HakanTuzun Avatar asked May 06 '11 08:05

HakanTuzun


People also ask

How do I print to a Bluetooth printer from my Android phone?

Connecting the Printer to Your Android DeviceGo to Settings > Wireless & Network and turn on Bluetooth. Wait while your device scans for the printer. The printer is displayed when your device finds it. Tap the printer.

Can I Bluetooth print from my phone?

To do that, make sure your printer's Bluetooth setting is turned on and is discoverable. On your phone, start the Settings app, tap Connected devices and tap Pair new device. When your phone finds the Bluetooth printer, select it and complete the pairing process. Once paired, you should be able to print normally.


2 Answers

You could wrap the native API's in a PhoneGap plugin to map the native API's to JavaScript. See the plugin examples here.

like image 68
Paul Beusterien Avatar answered Oct 03 '22 18:10

Paul Beusterien


There is a plugin for PHonegap to handle bluetooth devices. It lacks proper documentation for new users but I hope you can figure your way out. If you have problem comment here I'll share the code which I implemented using the bluetooth example.

Good luck.

like image 25
Jay Mayu Avatar answered Oct 03 '22 18:10

Jay Mayu