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. DatePicker: years before 2000

My app (TKBirthdayreminder) is heavily relying on DatePicker and
DatePickerDialog. A few users have reported problems while entering
the birthday date, specifically years prior to 2000. I was told by one
user that on a Samsung Moment hitting the minus button below the year
field will lead to 2002 -> 2001 -> 2000 -> 2099. Can a Samsung Moment
owner please verify this assumption?

The DevGuide contains a small sample app:
http://developer.android.com/guide/tutorials/views/hello-datepicker.html

Thank you very much.

Regards
Thomas

-- 

2. How to add 3rd party library

Hi,

I want to use a native libraries written in C (supplied by 3rd party
vendor) in android native application.

I have added it like this in make file

LOCAL_SHARED_LIBRARIES += libutils libcutils libmylibrary1
libmylibrary2 libmylibrary3

LOCAL_PRELINK_MODULE := FALSE

LOCAL_MODULE := my_test

When i add this and compile it says

make: *** No rule to make target `out/target/product/bigfoot/obj/lib/
libmylibrary1.so', needed by `out/target/product/bigfoot/obj/
EXECUTABLES/my_test_intermediates/LINKED/my_test'.  Stop.

This 3rd party library is built using linux-eabi-arm and glibc2.2.
Will it work on android. Please confirm.If no i want to know the
reason for the same.

Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~

3. Problem for porting g-sensor driver

4. Sorry,can't play this video

5. Poll Screen On/Off state

6. Is the SQLiteDatabase thread-safe?

7. Market search and Top free/paid result order