Windows MTP/WPD communication with Android device
Asked Answered
P

1

6

I'm developing a PC c++ application running on windows. The application shall communicate with an android phone connected thru USB, using MTP. The idée is to not mount the Storage Card. What I have found is that Windows have something they call WPD (Windows Portable Device ) which supports MTP. It looks pretty ok but it demands WMP11 to be installed. What I wondering:

  • Is there are any other alternatives libraries you can use?
  • Do any one have any tips or experience about using WPD?
  • Are there any "leaner" dependencies you can install instead of WMP11 for xp?

Any help would be greatly appreciated.

Piperonal answered 27/10, 2011 at 7:15 Comment(0)
P
6

I here provide some answers to my question for the hope that it will help some one else.

Is there any alternatives/leaner libraries?

  • You can use WIA but that is only used for images. but a part from that I have not found any.

Any tips?

  • Check out the sample code provided by Microsoft, it is a good start point. I found it be searching for Portable Devices COM API Sample on MSDN
  • For Services you can check out this sample code. Which I found by googling for WpdServicesApiSample
  • The WPD api is pretty ok to use.
  • Not all devices support MTP and some only support part of it. This caused me some problem but the device we used released an update which supported more of MTP
  • I found the answer about XP-problems from this StackOverflow by pcbbc really helpful. I can also add that we mailed the supplier and asked for a custom .INF file to support XP and they were really helpful and provided us with it. But it took some time before we got it.
Piperonal answered 17/1, 2012 at 14:14 Comment(1)
@CherryDT I am sorry if you find anything please feel free to add some more answers. To be fair it was 11 years ago that I worked with this.Piperonal

© 2022 - 2024 — McMap. All rights reserved.