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 Developer Challenge 2 Question

I hope somebody from the Android team can answer this question.

I plan on developing an app that has user-generated content. One of
the eligibility rules is that the app should not have been published
on a public web site.

Since my app needs user-generated content, I need to populate it with
data so that those who get to use the app can enjoy it. I wonder if a
web site that is open only to friends or families does not constitute
a public web site.

The app is also accessible on the web and on the phone. Is this ok?
And once the judging starts, can I open the web site to the public?


2. Android SDK Content Loader gets stuck....

I am seeing the project refresh in Eclipse get stuck when it runs the
Android SDK Content Loader.  Does anyone else see this?

Any clue on cancelling this task?  When I click the red square, the
IDE just sits there.

Restarting eclipse doesn't help - the  IDE just starts this task again
when it is restarted.


Richard Schilling
Root Wireless


3. T-Mobile servers compromised?

4. Sounds + Accelerometer = Weird accelerometer values: BUG?

5. Setting up AVD?

6. How to test the andriod ported on a new hardware

7. Idea: a "map feature provider" system for Android