How To Use MTP-connected Devices

by Doug Gordon » Thu, 03 Mar 2011 01:48:04 GMT

Sponsored Links
 My app currently requires the user to manually copy certain files from 
their PC to their USB-mounted Android device where my app can open them 
and do its thing. But I'm already running into issues with users' 
devices that want to mount in this "MTP" mode, and I hear that the Xoom 
*only* supports MTP, etc.

So how can MTP be used to transfer files to the device that don't really 
fit into the "Media files" category, and how do I locate the directory 
from my app? What do getExternalStorageDirectory and getExternalFilesDir 
return for a device like the Xoom?

Doug Gordon
GHCS Software


Re: How To Use MTP-connected Devices

by FrankG » Thu, 03 Mar 2011 04:59:35 GMT

 Hi Doug,

I can imagine that this will be more an more a problem for
like yours : You cannot know in which usb mode the target device is
as this is highly vendor/manufacturer specific. You would also run
into trouble
if the user will use pictbridge. And you also not able to trigger a
mode change
because the interface to this is also specific for the manufacturer.

Would be interessted to know whether XOOM only supports MTP, but --
how far I understood Dianne in the past -- it must be at least MTP
otherwise Android Market will not work ?

Good luck !



Sponsored Links

Other Threads

1. android:layout_marginRight?


  I have a small text view (see below) that should span the complete width,
except for a margin left and right. No matter what I specify for
marginRight, it always gets added to the left side, i.e. the margin left
grows and the text view is flush to the right side though.

  Am I doing something wrong here?


<?xml version="1.0" encoding="utf-8"?>




2. Ang.: Getting the battery current and voltage values for the Android Phone


449 mA is the max current for USB charging connected to a PC. If you read
the value when charging with a wall plug you will get a higher value
(probably around 700 mA but it is depending on the charger and the PMIC).


Den 15 mar 2010 15.55, "Chris Stratton" <> skrev:

It might be a current estimate, but since it was reported to be
nonzero only with external power it sounds more like charge current
than drain.  Would be interesting if it turns out different with the
wall charger vs. usb.

Android being open source Chintan should be able to track down the
source of the number by perusing the sources.

Its probably possible to make an instrumented dummy battery for
research purposes, though it would requure figuring out the interface.


> > > > website:

3. I don't HATE apple, but I found these interesting things yesterday, poor iphone developers.

4. Broadcast Receiver / Service will only restart my activity once.

5. mapview: what might cause the google logo to show up as a red box?

6. Is this legit? - Device Seeding Program

7. How could I make such a UI? customized UI issue