• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to get the "MTP mount point" from my Win/Mac app

On Mac OS X, there is no mount point. Mac OS X doesn't have native support for MTP. A Mac OS X user needs to use the Android File Transfer app. If you want to communicate with an Android 3.0+ device from a Mac OS X app, you'll need to provide your own MTP host. DoubleTwist doesn't work with Android 3.0+ devices over USB, probably for this very reason.

Under Windows, MTP devices are also not exposed in the regular filesystem. Normally you can drag and folder from Windows Explorer into Command Prompt to get the path of a folder, but Command Prompt won't accept folders from MTP devices. It's been a very long time since I've done Windows programming, and I'm not about to start again. But I think you'd have to look not at the Android API for this, but the Win32 API. Perhaps there is a device enumeration API that you can you to find the Android device, and from there get access to an API with which you can use to transfer files.
 
Upvote 0
Hi,

Thank you for your reply. It's OK.

BTW, I have a question.(change question)

How do I get "MTP mount path(Android device)" from my Android app?
For example, "/sdcard", "/sdcard2" and so on.

Almost MTP mount path is "/sdcard", but these mount point path are different from each device manufacturer.
So, I need to know the MTP mount path from my android app in order to put files to MTP mount path.

Are there any way to get MTP mount path from my Android app?

Thanks,
ptaro
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones