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;
}
ClientThread.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:LittleBitLouder
作者:
评论列表
文章目录