MTP API for integrating with           external cameras
MTPMTP = Media Transfer Protocol  PC  USB Mass Storage
MTP (    )
MtpConstants     MTP            (                       )MtpDevice        MTPMtpDeviceInfo    MTP                         ...
MTPUSBUSB           MtpDeviceUSB                       MtpDevice       openMTP
MTPAndroidManifet.xml  <!-- USB Host API                       -->xml/device_filter.xml  <!--         -->     <!--         ...
int[] storageIds = mtpDevice.getStorageIds();for (int storageId : storageIds) {  //}
////int[] objectHandles = mtpDevice.getObjectHandles(storageId,                          0, //           (0             ) ...
TipsUI              MTP               UI                               (    )     Cybershot DSC-HX5     30msec     iPhone4...
Tips (cont’d)MTP           (                           ) iPhone                                           ) Galaxy S(Win7 ...
Tips (cont’d)MtpDevice raw byte
Honeycomb 3.2Media Framework  Applications that use the platforms media provider (MediaStore)  can now read media data dir...
Honeycomb 3.1       MTP             Galaxy S             Motorola XOOM      2      DEVICE_ATTACHED      1                 ...
WEB
Upcoming SlideShare
Loading in …5
×

Honeycomb 3.1 MTP 解説

2,623 views
2,538 views

Published on

ABC 2011 Summer のデ部によるHoneycomb API解説での担当分その2

3.1で追加されたMTPについて、実装時にひっかかりそうな部分を中心に解説

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,623
On SlideShare
0
From Embeds
0
Number of Embeds
46
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Honeycomb 3.1 MTP 解説

  1. 1. MTP API for integrating with external cameras
  2. 2. MTPMTP = Media Transfer Protocol PC USB Mass Storage
  3. 3. MTP ( )
  4. 4. MtpConstants MTP ( )MtpDevice MTPMtpDeviceInfo MTP IDMtpObjectInfo MTPMtpStorageInfo MTP
  5. 5. MTPUSBUSB MtpDeviceUSB MtpDevice openMTP
  6. 6. MTPAndroidManifet.xml <!-- USB Host API -->xml/device_filter.xml <!-- --> <!-- 6 ( UsbConstants) --> <usb-device class=”6” /> <!-- --> UsbDevice device = (UsbDevice) intent.getParcelableExtra(...); UsbDeviceConnection conn = mUsbManager.openDevice(device); MtpDevice mtpDevice = new MtpDevice(device); mtpDevice.open(conn); //
  7. 7. int[] storageIds = mtpDevice.getStorageIds();for (int storageId : storageIds) { //}
  8. 8. ////int[] objectHandles = mtpDevice.getObjectHandles(storageId, 0, // (0 ) 0 // (0 ));for (int objectHandle : objectHandles) { MtpObjectInfo objectInfo = mtpDevice.getObjectInfo(); if (mtpObjectInfo.getAssociType() == MtpConstants.ASSOCIATION_TYPE_GENERIC_FOLDER) { // } else { // }}
  9. 9. TipsUI MTP UI ( ) Cybershot DSC-HX5 30msec iPhone4 10msec
  10. 10. Tips (cont’d)MTP ( ) iPhone ) Galaxy S(Win7 PC ) Mass Storage ( )
  11. 11. Tips (cont’d)MtpDevice raw byte
  12. 12. Honeycomb 3.2Media Framework Applications that use the platforms media provider (MediaStore) can now read media data directly from the removeable SD card, where supported by the device. Applications can also interact with the SD card files directly, using the MTP API. media provider (MediaStore) SD MTP API SD
  13. 13. Honeycomb 3.1 MTP Galaxy S Motorola XOOM 2 DEVICE_ATTACHED 1 UsbDeviceConnection 2 MtpDevice (new )
  14. 14. WEB

×