This tutorial describes how to retrieve the phone signal strength using the multimode phone sub-sessions. Phone signal strength information is expressed as two integers:
The function must return the signal strength and the number of bars to be displayed to the user.
The following code checks if the signal information can be obtained, and if so, gets the signal information. The code assumes iMobilePhone is an RMobilePhone object.
TUint32 signalCaps; User::LeaveIfError(iMobilePhone.GetSignalCaps(signalCaps)); TInt32 signalStrength = 0; TInt8 bars = -1; if (signalCaps & RMobilePhone::KCapsGetSignalStrength) { TRequestStatus status; iMobilePhone.GetSignalStrength(status, signalStrength, bars); User::WaitForRequest(status); User::LeaveIfError(status.Int()); }
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.