title: Access connected MTP device without receiving USB_DEVICE_ATTACHED Intent?
body: <p>I´m working on some application which uses Media Transfer Protocol to read Photos from a Camera connected to my Android Tablets USB host (Android 3.1, Acer Iconia Tab A500).</p>
  
  <p>I found some tutorials describing how to work with USB and I got copying from USB camera to SD-Card already working.</p>
  
  <p>There is only one problem I have: All the tutorials wait for USB_DEVICE_ATTACHED-Intent and then open a UsbDeviceConnection for communicating with the device that is sent within the intents Bundle.</p>
  
  <p>So I would like to be able to manually start an activity which accesses USB - WITHOUT receiving this intent.
  The Problem now is, that I cannot open an USBConnection like this</p>
  
  <pre><code>UsbDeviceConnection usbDeviceConnection = usbManager.openDevice(usbDevice);
  </code></pre>
  
  <p>It simply returns null. 
  If I re-plugin the device and select my Activity as Intent receiver, it works fine.
  I think this must be because of the IntentReceiver having some exclusive permissions on the USB device.</p>
  
  <p>My Manifest looks like this:</p>
  
  <pre><code>    &lt;activity
          android:name=".ImageActivity"
          android:label="@string/app_name"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" /&gt;
          &lt;/intent-filter&gt;
          &lt;meta-data
              android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
              android:resource="@xml/device_filter" /&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>So one example: What if a user has set Galery as default for USB devices. How can I access the USB device in this case?</p>