How can i detect a cellphone connected to my computer.

Hi there, I need to know if it is possible to create a class that will detect if a cellphone is connect to my computer via a usb cable without knowing what the make and model of that computer is. If you think it is possible, how would you go about implementing it.

That's Operating System dependent.

If you're referring to Windows, then you can use the WINUSB API.
There is libraries which wraps USB interaction nicely.

If you need to only detect cellphones, you just need to search for specific substrings in device names/ID

If you want to maniulate them... Just to say it is hard work and you will have to add support for each series manually.
Topic archived. No new replies allowed.