Help , How can you detect whenever the power cord is unplugged from electrical socket through Symbian OS ?
The CTelephony
API has a GetIndicator()
method, which gives you flags including KIndChargerConnected
. There's one set to tell you whether detecting charger connection is supported, and then if it is you check the other to tell you whether a charger is connected. Like HAL, you never know exactly what's supported. I've never used it so I can't give you examples of handsets which do or don't implement it.
You can register for notification of changes with the NotifyChange()
method, using EIndicatorChange
.
Duplicating the Symbian part of the answer from your jsr-256 question:
The Symbian OS C++ API to check battery status is:
CTelephony::TBatteryInfo
Look it up in the Developer Library documentation at:
http://developer.symbian.org/main/documentation/carbide/index.php