|
Posted by Danny Baumann on June 28, 2005, 6:35 am
Please log in for more thread options
Hi,
is it possible on Smartphone 2003 to detect an USB cable connection? I had a
look and CreateEvent, SetEvent and friends, but the provided notifications
do not work for this case:
- NOTIFICATION_EVENT_NET_CONNECT and NOTIFICATION_EVENT_NET_CONNECT apply to
USB, bluetooth and GPRS connections
- NOTIFICATION_EVENT_OFF_AC_POWER and NOTIFICATION_EVENT_ON_AC_POWER do not
apply, as the USB cable is not recognized as a charger
- NOTIFICATION_EVENT_RS232_DETECTED and NOTIFICATION_EVENT_SYNC_END also
apply to USB and bluetooth
GetSystemPowerStatusEx does also not work correctly, as ACLineStatus is not
set to 1 when connected via USB, and with matching BatteryFlag and
BATTERY_FLAG_CHARGING I can not detect the connection if the battery is
fully charged.
I just want to know in my program when a charging device (and USB does
charge) is connected to the phone.
Does anybody know how to do this?
Thank you!
Regards,
Danny
|