E/BluetoothChatService( 8403): Hata
E/BluetoothChatService( 8403): java.io.IOException: Connection refused
E/BluetoothChatService( 8403): at
android.bluetooth.BluetoothSocket.connectNative(Native Method)
E/BluetoothChatService( 8403): at
android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:206)
E/BluetoothChatService( 8403): at com.androproject.picture.iletisim
$ConnectThread.run(iletisim.java:370)
public ConnectThread(BluetoothDevice device, boolean secure) {
mmDevice = device;
BluetoothSocket tmp = null;
mSocketType = secure ? "Secure" : "Insecure";
int port=1;
try
{
Method m =
device.getClass().getMethod("createRfcommSocket", new
Class[] { int.class });
tmp =
(BluetoothSocket)m.invoke(device,
port);
}catch (Exception e)
{
Log.e(TAG, "Failed to connect", e);}
mmSocket = tmp;
}
public void run() {
setName("ConnectThread" + mSocketType);
mAdapter.cancelDiscovery();
try {
mmSocket.connect();
Thread.sleep(6000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
Log.e(TAG, "", e);
e.printStackTrace();
}
catch (IOException e) {
Log.e(TAG, "Hata Buradaaaddddadadadadadh", e);
// Close the socket
try {
mmSocket.close();
} catch (IOException e2) {
Log.e(TAG, "unable to close() " + mSocketType +
" socket during connection failure", e2);
}
connectionFailed();
return;
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en