Thank you for this solution Daniel! This is very unpublicized.
The key difference is the string:
"createInsecureRfcommSocket"
versus the string used in the standard publicized hack:
"createRfcommSocket"
Apparently some devices demand it to be "unsecured" else it fails with
"permission Denied"
I have been able to fix the problem by using this code:
IntPtr createRfcommSocket = JNIEnv.GetMethodID(item.Class.Handle,
"createInsecureRfcommSocket", "(I)Landroid/bluetooth/BluetoothSocket;");
IntPtr _socket =
JNIEnv.CallObjectMethod(item.Handle, create
Same problem here.
Seems to be a android´s problem.
http://code.google.com/p/android/issues/detail?id=32545
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Bluetooth-problem-tp5713291p5713293.html
Sent from the Mono for Android mailing list archive at Nabble.com
Hi,
Bluetooth and Bluetooth_admin permission is set, and I also tested this code
written in java, simmilar exception.
Good thing, problem was solved when i repaired device.
Thanks
On Wed, Sep 7, 2011 at 4:30 PM, Jonathan Pryor wrote:
> On Sep 5, 2011, at 9:11 AM, Mario Kovač wrote:
> > Simple
On Sep 5, 2011, at 9:11 AM, Mario Kovač wrote:
> Simple example code, big problem. Any ideas?
...
> 09-05 14:59:51.479: INFO/MonoDroid(2327): java.io.IOException: Unable to
> start Service Discovery
> 09-05 14:59:51.479: INFO/MonoDroid(2327): at
> android.bluetooth.BluetoothSocket$SdpHelper.d