I am trying to interface an android app with a windows PC. The android tablet will act as the slave and the PC has the host. The PC will run a c# windows service, does any know what type of C# is needed to receive and send data via USB from/to android device.
I have tried this to get the list USB devices, not sure how read USB data:
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PnPEntity WHERE PNPDeviceID LIKE '%USB%'");
// Get the collection of management objects
ManagementObjectCollection collection = searcher.Get();
foreach (ManagementObject device in collection)
{
string description = device.GetPropertyValue("Description")?.ToString() ?? "";
string manufacturer = device.GetPropertyValue("Manufacturer")?.ToString() ?? "";
}
New contributor
Khaled Telfah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2