컴퓨터에서 실행중인 서버와 안드로이드 블루투스 응용 프로그램의 연결을 포함하는 블루투스 응용 프로그램에서 작업하고 있습니다. 이 서버는 Blue-Cove API를 사용하여 만든 블루투스 애플리케이션이기도합니다.android and PC bluetooth applications 사이의 연결
내 모바일 앱과 컴퓨터 서버 응용 프로그램을 연결할 수 없다는 문제가 있습니다.
try {
// Connect the device through the socket. This will block
// until it succeeds or throws an exception
mySocket = myDevice.createRfcommSocketToServiceRecord(MY_UUID);
mySocket.connect();
toast = Toast.makeText(context, "Connection established", thisClass.duration);
toast.show();
} catch (IOException connectException) {
// Unable to connect; close the socket and get out
try {
mySocket.close();
toast = Toast.makeText(context, "Connection not established", thisClass.duration);
toast.show();
} catch (IOException closeException) { }
return;
}
인 문제 나 어떤 아마도 내가 그 안에 실종 :
여기 내 안드로이드 응용 프로그램에 대한 코드입니다. 또한 socket.connect() 메서드에 대한 이해가 모호합니다. 이 점에 대해 친절히 도와주세요.