Skip to content

Instantly share code, notes, and snippets.

@MikeLarned
Created September 24, 2012 15:21
Show Gist options
  • Select an option

  • Save MikeLarned/3776505 to your computer and use it in GitHub Desktop.

Select an option

Save MikeLarned/3776505 to your computer and use it in GitHub Desktop.
ZebraInsecureConnection
private ZebraSocket tryPublicApiWay() throws ZebraPrinterConnectionException
{
try {
BluetoothSocket bSocket = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(this.macAddress).createRfcommSocketToServiceRecord(UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"));
ZebraBluetoothSocket zBtSocket = new ZebraBluetoothSocket(bSocket);
zBtSocket.connect();
return zBtSocket;
} catch (IOException e) {
throw new ZebraPrinterConnectionException(e.getMessage());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment