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. Can We make canvas trancluent ?

How can we make canvas translucent background to play images in the

plz give me some suggestions regarding this ....thanks a lot ina

2. att'n moderators: Fwd: Erreur d'envoi : nocompromise

Sure would be nice if there was a moderator/admin address we could send
stuff like this to. But in any case, every post to -discuss results in one
of these.

(For those that don't speak french, google translate says the "nocompromise"
group is closed and I should stop posting to it. ... yeah.)

---------- Forwarded message ----------
From: <>
Date: 2009/8/2
Subject: Erreur d'envoi : nocompromise


 Nous vous crivons pour vous informer que le groupe que vous avez essay de
 (nocompromise) n'existe pas, ou que vous ne disposez pas des autorisations
ncessaires pour y publier un message. Plusieurs raisons  ce problme sont
possibles :

 * Vous avez peut-tre orthographi ou mis en forme le nom du groupe de
 * Le propritaire a retir ce groupe. Il n'y a donc plus personne 

 * Il se peut que vous soyez oblig de rejoindre le groupe avant d'tre
autoris  envoyer des messages.
 * Il se peut qu'il soit impossible d'envoyer des messages sur ce groupe.

 Si vous avez des questions sur ce groupe Google ou un autre groupe,
consulter le Centre d'aide Google Groupes  l'adresse suivante :

 Merci de votre confiance.

 L'quipe Google Groupes


3. text colour

4. Porting A Game from Java2d...

5. Activity objects in memory after onDestroy.

6. Sending an email

7. Writing specific apps for clients