title: android.hardware.usb UsbManager class public methods getDeviceList and getAccessoryList return null
body: <p>I am trying to connect an Android phone via USB to an accessory (in this case a MacBook pro) and use getDeviceList() to verify that the connection is recognized and print the description of the UsbDevice object to the screen via toString() using the following code:</p>
  
  <pre><code>//as host
  HashMap&lt;String, UsbDevice&gt; deviceList = manager.getDeviceList();
  Iterator&lt;UsbDevice&gt; deviceIterator = deviceList.values().iterator();
  String s = "";
  while(deviceIterator.hasNext()){
     UsbDevice device = deviceIterator.next();
     manager.requestPermission(device, mPermissionIntent);
     Log.d("List Devices", device.toString());
  
     s += device.toString();
  }
  </code></pre>
  
  <p>The code sample came almost directly from the Android Developer site, but multiple phones do not seem to be recognizing any peripheral.  Similarly, I have tried treating the Android phone as the accessory, but am getting similar results.  Any help is appreciated.</p>