类 BluetoothPort

  • public class BluetoothPort
    extends GpPort
    • 构造器详细资料

      • BluetoothPort

        public BluetoothPort(int id,
                             BluetoothDevice device,
                             Handler handler)
        Constructor. Prepares a new BTPrinter session.
        context - The UI Activity Context
        handler - A Handler to send messages back to the UI Activity
    • 方法详细资料

      • connect

        public void connect()
        Start the ConnectThread to initiate a connection to a remote device.
        device - The BluetoothDevice to connect
      • connected

        public void connected(BluetoothSocket socket,
                              BluetoothDevice device)
        Start the ConnectedThread to begin managing a Bluetooth connection
        socket - The BluetoothSocket on which the connection was made
        device - The BluetoothDevice that has been connected
      • stop

        public void stop()
        Stop all threads
      • writeDataImmediately

        public GpCom.ERROR_CODE writeDataImmediately(java.util.Vector<java.lang.Bytedata)
文档更新时间: 2020-04-26 17:07   作者:Gainscha佳博