title: How can i use the Bluetooth HID Device profile in Android Pie?
body: <p>I am trying to write an app for Android P using the Bluetooth HID device profile service to be used as a Bluetooth keyboard. According to the <a href="https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice" rel="noreferrer">documentation</a> I am supposed to use the method <code>BluetoothAdapter.getProfileProxy(Context, BluetoothProfile.ServiceListener, int)</code> to get the BluetoothHidDevice proxy object.</p>
  
  <p>During debug on my Android Pie device (Nokia 7 plus) the service listener never get called (<code>onServiceConnected</code>), and i get the following error in Logcat:</p>
  
  <pre><code>Could not bind to Bluetooth HID Device Service with Intent { act=android.bluetooth.IBluetoothHidDevice }
  </code></pre>
  
  <p>If I change the last param in the call above from  <strong>HID_DEVICE</strong> to some other bluetooth profile e.g. <strong>A2DP</strong>, the service listener get the callback <code>onServiceConnected</code> and no error is displayed.</p>
  
  <ol>
  <li>Has anyone created a working HID_DEVICE on Android Pie?</li>
  <li>Can <code>BluetoothHidDevice</code> be used to create a hid-device on an Android
  Pie phone?</li>
  <li>Is there any working code that i can look at?</li>
  <li>Is there some feature (<code>getPackageManager().hasSystemFeature</code>)
  missing in my    phone?</li>
  <li>What could be the reason for the error above?</li>
  </ol>
  
  <p>Any hints would be greatly appreciated :)</p>
  
  <p>This seems to be a third-party issue. Nokia did not enable the hid-profile in Android Pie. I also tried with a Mototorola G7 play, it was also disabled, i guess it's time for a pixel... </p>