Hi all, Thank you!
I followed Vijay's reply to use Java reflection regarding Android Bluetooth Profiles (A2DP and Headset) classes, I use SDK 15 (4.0.3), which still keeps connect() methods hidden. I also tried to follow Raunaque's advice, but no success with RFCOMM socket although I used correct UUID (Service Discovery Failure exception). I try again more attentive. A solution for pairing I will look next is using bluez via DBus. I've tried this approach on Linux from command-line d-bus utilities (http:// zitzlinux.wordpress.com/2011/02/28/connecting-bluetooth-devices-from- command-line/) and got headset paired, I hope it can be done programmatic in Android. Best regards, Alexei On 30 май, 04:51, Raunaque Quaiser <rmquai...@gmail.com> wrote: > Please check the SDK of Android Framework if it support the Headset > Bluetooth class. Check for the UUID you are using to pair the headset with > Nexus. Each BT class profile has unique ID . If the UUID is not correct it > will not pair even if the SDK supports BT headset profile , > > Raunaque > > On Wed, May 30, 2012 at 2:17 AM, vijay Badawadagi <vijaybadawad...@gmail.com > > > > > > > > > wrote: > > try to connect via reflection, can solve the problem like below > > m = mmDevice.getClass().getMethod("createInsecureRfcommSocket", new > > Class[]{int.class}); > > tmp = (BluetoothSocket)m.invoke(mmDevice, Integer.valueOf(1)); > > > Thanks > > Vijay > > > On Tue, May 29, 2012 at 12:54 PM, Alexei Tchervinsky < > > alexey.tchervin...@gmail.com> wrote: > > >> Hi all, > > >> I have NFC-enabled headset Nokia BH-505 and NFC-enabled smartphone > >> Samsung Nexus S. I am writing Android Java application to connect the > >> devices via NFC for later Bluetooth connection, > > >> NFC Static Handover pass ok, but Bluetooth connect() from phone to > >> headset fails with "Service Discovery Failure" exception. > > >> Does anybody have a similar experience to discuss my problem in more > >> details? > > >> Any help will be greatly appreciated. > > >> Thanks in advance, > >> Alexei > > >> -- > >> You received this message because you are subscribed to the Google > >> Groups "Android Developers" group. > >> To post to this group, send email to android-developers@googlegroups.com > >> To unsubscribe from this group, send email to > >> android-developers+unsubscr...@googlegroups.com > >> For more options, visit this group at > >>http://groups.google.com/group/android-developers?hl=en > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en