androidusbhostandroid-usbperipherals

How to communicate between android device and machine which runs on windows via USB


I am working on one android app where I am trying to establish a communication between android device and machine which runs on windows OS. I want to transfer some bytes from android device to that machine using USB.

I believe that machine which runs on windows OS always act as host. correct ?

I see android has two API's

Can anyone suggest me which API will work for me ?


Solution

  • I believe that machine which runs on windows OS always act as host. correct ?

    Yes. Windows OS will act as USB host.

    Can anyone suggest me which API will work for me ?

    Your android device will act as accessory. So follow the Accessory APIs.