The log says :
java.io.IOException: Function not implemented
at android.bluetooth.BluetoothSocket.initSocketNative(Native Method)
at android.bluetooth.BluetoothSocket.<init>(BluetoothSocket.java:188)
at android.bluetooth.BluetoothDevice.createRfcommSocketToServiceRecord(BluetoothDevice.java:1093)
at anywheresoftware.b4a.objects.Serial.Connect2(Serial.java:147)
at anywheresoftware.b4a.objects.Serial.Connect(Serial.java:117)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:747)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:342)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at anywheresoftware.b4a.objects.Serial$BluetoothAdmin$1$1.run(Serial.java:341)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5074)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
But why cant i connect ??
The error comes at this line
serial1.Connect(connectedDevice.Mac)
java.io.IOException: Function not implemented
at android.bluetooth.BluetoothSocket.initSocketNative(Native Method)
at android.bluetooth.BluetoothSocket.<init>(BluetoothSocket.java:188)
at android.bluetooth.BluetoothDevice.createRfcommSocketToServiceRecord(BluetoothDevice.java:1093)
at anywheresoftware.b4a.objects.Serial.Connect2(Serial.java:147)
at anywheresoftware.b4a.objects.Serial.Connect(Serial.java:117)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:747)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:342)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at anywheresoftware.b4a.objects.Serial$BluetoothAdmin$1$1.run(Serial.java:341)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5074)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
But why cant i connect ??
The error comes at this line
serial1.Connect(connectedDevice.Mac)