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. Database Database Database

Hey guys
I have simple 2 button screen which are "Create Item" and "List'
These two have been linked to other activities with intent.
Now in create.java class i have 2 fields name and description and a
save button.
So that when the user clicks save button the data must get saved but
it is giving me a force close error.

This is my error message

No command output when running: 'am start -n org.finaldatabase/
org.finaldatabase.finaldatabase -a android.intent.action.MAIN -c
android.intent.category.LAUNCHER' on device emulator-5554

Exception Stack Trace

com.android.ddmlib.ShellCommandUnresponsiveException
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:
408)
        at com.android.ddmlib.Device.executeShellCommand(Device.java:277)
        at
com.android.ide.eclipse.adt.internal.launch.ActivityLaunchAction.doLaunchAction(Unknown
Source)
        at
com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launchApp(Unknown
Source)
        at
com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.simpleLaunch(Unknown
Source)
        at
com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.access
$3(Unknown Source)
        at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController
$3.run(Unknown Source)


Please let me know if you want to have a look at the code also.
There must be a silly mistake which i cant catch but i want to clear
this doubt .

Happy New Year

-- 

2. WTH: Galaxy Tab ada pesan downloadi ng 鈥

Jadi masuk ke downloading mode itu bang. Hold power button aja lamaan untuk
shutdown lalu on-in lagi.

--rc
HD2 JawsMIUI2412 NAND
On Jan 1, 2011 7:23 AM, "Bambang Soerjo Pranoto (Yongky)" <


harus pencet volume down n power. Tapi hasilnya seperti ini.

-- 
===============
"

3. Licensing Verification Library and Demo versions

4. How to do this kind of screen alignment?

5. Jual Samsung Spica

6. CLOSED WTA cara off data service

7. Beejive error