diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-4ED3D609-5E24-53D2-BF0C-DE7BD2E79260.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-4ED3D609-5E24-53D2-BF0C-DE7BD2E79260.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,51 @@ + + + + + +Phone +Signal TutorialThis tutorial describes how to retrieve the phone signal strength +using the multimode phone sub-sessions. Phone signal strength information +is expressed as two integers: + + +
    +
  1. Signal strength in dBm +

  2. +
  3. Number of signal bars that the phone must display.

  4. +

+ +Find if the signal +information can be obtained using RMobilePhone::GetSignalCaps() + +Get the signal information +using RMobilePhone::GetSignalStrength(). + +Use RMobilePhone::NotifySignalStrengthChange() to +get the notification if signal information changes. + + +

The function must return the signal strength and the number of +bars to be displayed to the user.

+Phone signal example

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()); + } +
+
\ No newline at end of file