Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

access mtp device with java

I have developed a small application that copies files from a folder to another.I use a JFileChooser to select the target directory.Something I hadn't tried for a long time is to select my phone as the target directory.I tried but I couldn't find it from my JFileChooser. I read some other so questions and I was wondering if there is that will allow me to copy files from my pc to an mtp device? I am targeting linux and windows platforms.

My phone is LG Nexus 5 android 6.0.1.

like image 752
cssGEEK Avatar asked Aug 29 '16 16:08

cssGEEK


People also ask

Is there a way to run programs on a MTP device?

The "Unix way" of running small programs that open the device, do something, then close the device, isn't really working with such devices and you cannot expect to have command line tools like the mtp examples work with them. You could implement new example programs that just call to a mediating daemon like the Windows MTP stack does.

How do I enable MTP on Windows 10 IoT Core?

Launch PowerShell or SSH and access your device running Windows 10 IoT Core. Create a temporary folder on the target machine (e.g. C:\MTPTemp ). The device will boot to the Update OS, install the MTP feature, and reboot to the MainOS.

What is MTP and how does it work?

The Media Transfer Protocol (MTP) allows you to transfer files to and from your Windows 10 IoT Core device through USB. It allows access to the device's internal storage and the SD card, if present. The feature is part of the IoT Core Kits, which can be downloaded and installed from the Windows 10 IoT Core Packages.

What is MTP mode on Android?

The Media Transfer Protocol (MTP) is an extension to the Picture Transfer Protocol (PTP) communications protocol that allows media files to be transferred automatically to and from portable devices. … In 2011, it became the standard method to transfer files from/to Android. How do I enable USB preferences?


1 Answers

In modern Android releases, USB Mass Storage has been disabled. You can try to enable USB Debugging (in Developer Options) and see if it helps. I've tried it successfully on Windows 10 with a LG G3 Android 5.0

like image 53
sabuha Avatar answered Oct 02 '22 23:10

sabuha