Hi All Anybody please respond to my question about the bluetooth service registration and connection with the Bluegiga access server.
On Fri, Oct 8, 2010 at 12:10 PM, Ajmer singh <[email protected]>wrote: > Hi > > I am working on a Android app that require a Bluetooth Access Server that > try to Discover the Application on Android phone and once connected send the > Ads back to the phone. > > However the access server is not able to discover the Service that i have > registered using the BluetoothAdapter > listenUsingRfcommWithServiceRecord("BlueToothFriendFinder",MY_UUID ), > > Please let me know either i have sucessfully register the Bluetooth service > or not,Please let me know if anyone has work on this before. > > Below is the Code packet that i am using : > private class AcceptThread extends Thread > { > private final BluetoothServerSocket mmServerSocket; > public AcceptThread() > { > BluetoothServerSocket tmp = null; > try > { > UUID MY_UUID = > UUID.fromString("fa87c0d0-afac-11de-8a39-0800200c9a66"); > > tmp = > mBluetoothAdapter.listenUsingRfcommWithServiceRecord("BlueToothFriendFinder",MY_UUID > ); > > } > catch (IOException e) > { > > } > > mmServerSocket = tmp; > > } > public void run() > { > BluetoothSocket socket = null; > while (true) > { > try > { > Log.v("Working ","Server Register..."); > socket = mmServerSocket.accept(); > > bluetoothFinder.runOnUiThread(new Runnable() > { > public void run() > { > Toast.makeText(bluetoothFinder, "Connected > Connected Conect....", Toast.LENGTH_SHORT).show(); > } > }); > } > catch (IOException e) > { > break; > } > if (socket != null) > { > manageConnectedSocket(socket); > try > { > mmServerSocket.close(); > } > catch (IOException e) > { > e.printStackTrace(); > } > break; > } > } > } > > -- > *Thanks and Regards > Ajmer Singh* > > > -- Thanks and Regards Ajmer Singh -- 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

