Bluetooth Printing on Android

前端 未结 4 934
孤独总比滥情好
孤独总比滥情好 2021-02-06 19:52

I am trying to print to an HP DeskJet 450wbt printer from my T-Mobile Pulse Mini phone, using the Android Bluetooth API. The code is as shown below. The connection fails with \"

4条回答
  •  天涯浪人
    2021-02-06 20:24

    Try this:

    Method m = device.getClass().getMethod("createRfcommSocket", new Class[] {int.class});
    tmp = (BluetoothSocket) m.invoke(device, 1);
    

提交回复
热议问题