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. Activity within TabActivity: onResume not always called when tab selected?

Maybe I have found something:

then the listener is called:

String tabTag = getTabHost().getCurrentTabTag();
if tabTag.isEqual(TAB_B) {
  MyBActivity bActivity = (MyBActivity
  bActivity->refreshFromDB(); //

I will try that.


2010/6/13 Thierry Legras <>



2. Upgrade AmonRa di Dream [WTA] Cara update Recovery ROM

As subject mau tanya,
Sekarang saya pake HTC Dream dengan Recovery Amonra 1.5.2 rencana mo
diupgrade ke 1.6.2 ato 1.7.0
Bagaimana ya caranya?
Apa bisa pake Flashrec?
Prefer yang simple aja hehehe,saya agak buta shell command di linux.


Dikirim dari Robotitem G1
Jangan dekati atau kau teracuni

Maap nih, :D
HH apaan ? Android saya HTC Hero. ROM udah pake Sense Hero yang baru.


Go Green......GoWes Lah......

2010/6/12 Jefri P <>

"Indonesian Android Community [id-android]"

3. Finalizing a Cursor that has not been deactivated or closed non-fatal error

4. GLES/IntBuffer/?? Mis-placed verts?

5. Make entire screen disabled

6. TaskAffinity causes new instance being created when startActivity

7. App not showing in Market - 2.1, not copy protected