I mean to start developing a simple android application for printing labels using zebra RW420 printer. They have SDK for android but I cannot figure out where to start from.
I invision an app with a single screen, it asks for the label or purchase order, how many copies we'd like to print, and a print button. Can someone help me get started. Any help will be appreciated.
How I am a going to search for the printer will the SDK will do it for me ?? or I have to use Androids BluetoothAdapter class ... about the label format do I have to create myself or I can use the existing file in the SDK ??
Can I set the printer to print multiple copies ??
The SDK provides a bluetooth discovery class. Look at the documentation and the examples. Check out the BluetoothDiscoverer
class. It provides a method to find all bluetooth devices and notifies you in a handler. There is a Developer Demo which comes with the SDK which has an example of how to do a discovery:
try {
BluetoothDiscoverer.findPrinters(this, new DiscoveryHandler() {
public void foundPrinter(DiscoveredPrinter printer) {
String macAddress = printer.address;
//I found a printer! I can use the properties of a Discovered printer (address) to make a Bluetooth Connection
}
public void discoveryFinished() {
//Discovery is done
}
public void discoveryError(String message) {
//Error during discovery
}
});
} catch (ConnectionException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With