October 27, 2017 - 5:37pm, 1934 views
Is it possible to detect, via software, if there is connection with a PC?
I would like to avoid output of debug info if there is no USB cable connected. And allow other processes when the cable is connected.
There's no system callback so that your application could be notified about plugging or unplugging of the USB cable.
You could try to detect this by listing the available ports in Java MIDlet or trying to redirect system.out to some USB interface or you'd need to use some hardware solution and a GPIO line for example to get the notification.
Hello, thank you for the answer. I´ll try check the available ports.
© 2013-2022 THALES DIS AIS Deutschland GmbH