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
applications
like yours : You cannot know in which usb mode the target device is
currently,
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
+ADB,
otherwise Android Market will not work ?

Good luck !

   Frank





-- 


Sponsored Links


Other Threads

1. Too many pattern attempts! HTC Magic locked out!

You could try the fix described here:

http://blag.xkcd.com/2009/09/12/i-need-g1-tech-support/

On Fri, Sep 25, 2009 at 13:36, Avi Greenbury







-- 
Caleb Eggensperger
http://calebegg.com/

--~--~---------~--~----~------------~-------~--~----~

2. ProgressDialog with a second thread - Screen Orientation and "back button". How to restore progress dialog?

Hi!

I've created ProgressDialog with a second thread according to the
DevGuide:
   http://developer.android.com/guide/topics/ui/dialogs.html#ProgressDialog
It works great till user:

1) changes screen orientation or
2) hits the back button twice (first to hide the dialog, second to
hide the app) to hide the application and run the app again after a
while.

Then, onCreate() is called (for the second time), and progress bar
stops responding properly. My thread may work for a few minutes and I
want to give the user possibility to hide it and do sth else. After a
while he might want to run the app again in order to check the
progress.

I found a few articles concerning this topic, but I couldn't find the
exact solution I should chose for this problem. So, could you tell mi
what is the proper way to handle this? Should i save the handler and
dialog state with "onRetainNonConfigurationInstance()"? If so, how to
do it properly and is it safe?

Or maybe my solution is wrong and I should create service, which
spawns the thread and communicates with activity (progress bar) with
AIDL?  But this will mean that the article in DevGuide is wrong, cause
it doesn't give a long term solution for creating a progress bar...

I'm stuck, and I'd appreciate all the response!
--~--~---------~--~----~------------~-------~--~----~

3. About tab icon

4. Can I set Activity android:enabled by java code?

5. Https connection : NoSuchAlgorithmException (when TLS is not enough...)

6. Potential issues I've found with the way ADC2 is working for games

7. Potential issues I've found with the way ADC2 is working for games