Android Zebra RW220不能在多台设备上打印

Android Zebra RW220不能在多台设备上打印,android,bluetooth,zebra-printers,Android,Bluetooth,Zebra Printers,我正在开发一些android应用程序,必须通过bluetooth Zebra打印机进行打印,在我看来,在一些设备上,这是一个例外: 11-26 12:37:00.399: W/System.err(17850): com.zebra.sdk.comm.ConnectionException: Could not connect to device: [JSR82] connect: Connection is not created (failed or aborted). 11-26 12:3

我正在开发一些android应用程序,必须通过bluetooth Zebra打印机进行打印,在我看来,在一些设备上,这是一个例外:

11-26 12:37:00.399: W/System.err(17850): com.zebra.sdk.comm.ConnectionException: Could not connect to device: [JSR82] connect: Connection is not created (failed or aborted).
11-26 12:37:00.400: W/System.err(17850):    at com.zebra.sdk.comm.ConnectionA.open(Unknown Source)
11-26 12:37:00.401: W/System.err(17850):    at com.zebra.sdk.comm.BluetoothConnection.open(Unknown Source)
11-26 12:37:00.403: W/System.err(17850):    at hr.ipc.ipcprinttest.Main$2.run(Main.java:104)
11-26 12:37:00.404: W/System.err(17850):    at java.lang.Thread.run(Thread.java:838)
下面是我使用的代码示例:

public class Main extends Activity {

    String theBtMacAddress = "00:03:7A:67:EE:08";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }

    public void onClick(View v){
        switch (v.getId()) {
        case R.id.button1:
            sendCpclOverBluetooth(theBtMacAddress);
            break;
        }
    }

    private void sendCpclOverBluetooth(final String theBtMacAddress) {

        new Thread(new Runnable() {
            public void run() {
                try {

                    Connection thePrinterConn = new BluetoothConnectionInsecure(theBtMacAddress);

                    Looper.prepare();

                    thePrinterConn.open();


                    String cpclData = "! 0 200 200 260 1\r\n"
                            + "TONE 0"
                            + "SPEED 3\r\n"
                            + "PREFEED 0\r\n"  
                            + "TEXT 11 0 0 0   ***Print test***\r\n"
                            + "LINE 0 33 350 33 3\r\n"
                            + "TEXT 11 0 0 48   Baterija: -1%\r\n"
                            + "TEXT 11 0 0 76   Datum: 26. studenoga 2014 09:07:34\r\n"
                            + "TEXT 11 0 0 104   Model ure|aja: Lenovo Lenovo A5500-HV\r\n"
                            + "TEXT 11 0 0 132   abc_^]Đ[@_~}|`{\r\n"
                            + "TEXT 11 0 0 160   ***Print test***\r\n"
                            + "PRINT\r\n";

                    thePrinterConn.write(cpclData.getBytes());

                    Thread.sleep(500);

                    thePrinterConn.close();

                    Looper.myLooper().quit();

                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }).start();
    }
}
我已经尝试了一切,但仍然没有找到具体的解决办法。如果这个问题有什么解决办法,我会请你帮助我。
谢谢你,并致以最良好的问候

在android设备上zebra SDK返回错误,我使用以下代码:

synchronized private static void zebraPrint() throws IOException {
    BluetoothAdapter blueTooth = BluetoothAdapter.getDefaultAdapter();
    blueTooth.cancelDiscovery();
    UUID SERIAL_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
    if (!blueTooth.isEnabled())
        blueTooth.enable();
    BluetoothDevice blueDevice = blueTooth.getRemoteDevice(printerMac);

    BluetoothSocket bSocket = blueDevice.createInsecureRfcommSocketToServiceRecord(SERIAL_UUID);
    if (!bSocket.isConnected())
        bSocket.connect();
    OutputStream  out = bSocket.getOutputStream();
    String data = "Your cpcl data";
    out.write(text.getBytes());
    out.flush();
    bSocket.close(); }

嘿你解决了吗?是的,我在这种设备上直接通过蓝牙串口发送数据,没有zebra SDK。那么你能分享相关代码吗?