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. Error 44

Hi,

After Make sdk i am getting following error ...
How to solve it?
t...@pcb-ramesh:/android_src/mydroid$ make sdk
build/core/product_config.mk:211: WARNING: adding test OTA key
============================================
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=
============================================
build/core/copy_headers.mk:15: warning: overriding commands for target
`out/target/product/generic/obj/include/libpv/getactualaacconfig.h'
build/core/copy_headers.mk:15: warning: ignoring old commands for
target `out/target/product/generic/obj/include/libpv/
getactualaacconfig.h'
Removing from sdk:
: out/target/product/generic/system/bin/dbus-daemon
: out/target/product/generic/system/bin/iptables
: out/target/product/generic/system/lib/libdbus.so
: out/target/product/generic/system/xbin/dbus-monitor
: out/target/product/generic/system/xbin/dbus-send
: out/target/product/generic/system/xbin/opcontrol
: out/target/product/generic/system/xbin/oprofiled
Package SDK: out/host/linux-x86/sdk/android-sdk_eng.test_linux-x86.zip
SDK: warning: including GNU target out/target/product/generic/system/
bin/dbus-daemon
SDK: warning: including GNU target out/target/product/generic/system/
bin/iptables
SDK: warning: including GNU target out/target/product/generic/system/
lib/libdbus.so
SDK: warning: including GNU target out/target/product/generic/system/
xbin/dbus-monitor
SDK: warning: including GNU target out/target/product/generic/system/
xbin/dbus-send
SDK: warning: including GNU target out/target/product/generic/system/
xbin/opcontrol
SDK: warning: including GNU target out/target/product/generic/system/
xbin/oprofiled
acp: partial write to 'out/host/linux-x86/sdk/android-
sdk_eng.test_linux-x86/platforms/android-1.5/images/system.img' (4096
of 8192)
make: *** [out/host/linux-x86/sdk/android-sdk_eng.test_linux-x86.zip]
Error 44

Regards
Ramesh Chandra
--~--~---------~--~----~------------~-------~--~----~

2. onResume after NotificationShade Pulled

My activity does not seem to trigger onResume after the notification
shade is pulled down.  Anyone else have this problem (or had and
sorted out how to fix it)?

Thanks,
Jason Van Anden

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

3. IntentService and WakeLock

4. Launch Emulatror through terminal.

5. Contribution to Android project.

6. pmem implementation

7. how to make a custom view shown on home screen as Ap pWidgeté”›