A
A
Alexander2015-08-04 17:51:50
Qt
Alexander, 2015-08-04 17:51:50

Play sound when connecting usb device?

You need to write a program that plays some sound when you connect usb (preferably a phone) or displays a window. And hung in the tray. In which direction to dig?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Pukhov, 2015-08-05
@Nexelen

We do it 1 time:
1. Get a list of connected USB devices
2. Determine what your phone is from this heap, remember DeviceID or some other parameter
1. " Wait " until someone connects something
2. Get a list of connected USB devices
3 look for your DeviceID in the list, if it exists, you can play the sound
ps if necessary, I can help with the development

D
Dmitry Kovalsky, 2015-08-04
@dmitryKovalskiy

Sorry for the sarcastic humor, but I think this program is called Windows. Can you describe the case in more detail? do you want an alarm when an MTP device is connected to your computer?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question