27

Whenever I connect the phone to my PC via USB, the phone displays a message asking me to DENY or ALLOW the MTP connection. I ALWAYS want to allow it

My device: Samsung S5

Android: 6.0.1

Is there any way to always allow it as default option.

the pop-up says: Allow access to device data. An MTP connection will be established to access the data on the connected device. DENY.......ALLOW

Alireza Noorali
  • 3,129
  • 2
  • 33
  • 80
Nawaf Abdu
  • 615
  • 1
  • 7
  • 13
  • I have the same problem. did you find the solution? – Alireza Noorali Dec 24 '18 at 17:38
  • Is this a programming issue or else? I have Samsung S5 (6.0.1) but I never see a popup but a notification instead, saying "Transfering media files via USB" when connected to a Windows 10 PC. Clicking on it will give me a few options – ecle Dec 25 '18 at 13:07
  • OK, I understand now. To set USB connection type to MTP as the default and to avoid the nagging popup forever until you change it, you need to enable the **Developer Options** in your Android system settings. Then, go to **Networking > USB Configuration** and set to **MTP** mode as the default mode. – ecle Dec 25 '18 at 13:16
  • https://stackoverflow.com/questions/32343380/how-to-set-android-m-default-usb-config-to-mtp-rather-than-charging-only – ecle Dec 25 '18 at 13:37
  • Anyway, it is not possible to programmatically change the USB connection mode via [**UsbManager.setCurrentFunctions()**](https://android.googlesource.com/platform/frameworks/base/+/0e2d281/core/java/android/hardware/usb/UsbManager.java) since the method is hidden from the developers https://stackoverflow.com/questions/13432694/access-to-usbmanagers-setcurrentfunction-in-android – ecle Dec 25 '18 at 13:55

0 Answers0