title: How to query remote mobile phone via Bluetooth as to whether it supports PBAP or not?
body: <p>Suppose two Android mobile phones are paired via Bluetooth and connection is established. How to programmatically determine at the client whether the remote device (the server) supports Bluetooth profiles such as PBAP?</p>
  
  <p>And if it does support it, then how to programmatically initiate a PBAP session with the remote device? </p>
  
  <p>I have extensively searched the net and so far have been unable to find API support and documentation for the same.</p>
  
  <h2>Edit</h2>
  
  <p>Would fetching the remote device's <strong>UUIDs</strong> be of any use here? If yes, how do I get to know whether it supports PBAP from that?</p>
  
  <h2>Update</h2>
  
  <p>I managed to connect to the remote device using:</p>
  
  <pre><code>mBluetoothSocket = mBluetoothDevice.createRfcommSocketToServiceRecord(applicationUUID);
                              btAdapter.cancelDiscovery();
                              mBluetoothSocket.connect();
  </code></pre>
  
  <p>where </p>
  
  <pre><code> private UUID applicationUUID = UUID.fromString("0000111E-0000-1000-8000-00805F9B34FB");
  </code></pre>
  
  <p>for hands free profile mode. Is there any such fixed UUID for connecting through <strong>PBAP</strong> mode though?</p>
  
  <h2>Update 2</h2>
  
  <p>Now I am able to pair with the remote device using the UUID 0000112F, which is the UUID for PSE access. When the connection is established, I get a message on the remote device asking me whether I can allow remote device access to call logs and contacts. I click on yes.</p>