what i'm trying to do:
- Create an App for windows to connect android phone.
- Send and receive data.
- Windows (C#) is the host device --> android UsbAccessory.
C#:
now i can select the COM5 (Android phone) and connect to it, using this code:
serialPort1.PortName = this.devicesList.Text; // COM5
serialPort1.Open();
addToList("SerialPort is opened", Color.Green);
Java (Android Phone):
UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
UsbAccessory[] accessories = manager.getAccessoryList();
accessories is Always Null, i tried every code i find, but i could not do it.
what i'm doing wrong?
Thanks.
from C# SerialPort with Java Android phone

No comments:
Post a Comment