ClientThread.java 文件源码

java
阅读 36 收藏 0 点赞 0 评论 0

项目:LittleBitLouder 作者:
public ClientThread(BluetoothDevice device, Handler handler, boolean secure) {
    BluetoothSocket tempSocket = null;
    this.handler = handler;
    this.secure = secure;
    this.device = device;

    try {
        if (secure)
            tempSocket = device.createRfcommSocketToServiceRecord(UUID.fromString(Constants.UUID_STRING));
        else
            tempSocket = device.createInsecureRfcommSocketToServiceRecord(UUID.fromString(Constants.UUID_STRING));

    } catch (Exception e) {
        Log.e(TAG, e.toString());
    }
    this.socket = tempSocket;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号