Retrieve Message Waiting Information Tutorial

This tutorial describes how to retrieve a message waiting information.

Message waiting indicator informs the subscriber that, depending on the mode, the voice messages, data messages, fax messages, and email messages are waiting to be retrieved.

  1. Use RMobilePhone::NotifyMessageWaiting() to get the notification when the phone receives a message waiting indication from the network. In GSM and WCDMA modes, message waiting indications are received through SMS messages. This is applicable only to CDMA.
  2. Retrieve the set of message waiting indicators from the current ICC using RMobilePhone::GetIccMessageWaitingIndicators(). Indicator values are described by RMobilePhone::TMobilePhoneMessageWaitingV1.
  3. Set the message waiting indicators on the current ICC using RMobilePhone::SetIccMessageWaitingIndicators().
  4. Use RMobilePhone::NotifyIccMessageWaitingIndicatorsChange() to get the notifications of any changes to the message waiting indicators on the current ICC.

Message waiting indicator example

The following code gets the message waiting indicators and returns the number of voice messages waiting.

TUint8 CClientApp::VoiceMessagesWaitingL()
    {
    RMobilePhone::TMobilePhoneMessageWaitingV1 messageWaiting;
    RMobilePhone::TMobilePhoneMessageWaitingV1Pckg messageWaitingPckg(messageWaiting);
    TRequestStatus status;

    iMobilePhone.GetIccMessageWaitingIndicators(status,messageWaitingPckg);
    User::WaitForRequest(status);
    User::LeaveIfError(status.Int());

    return messageWaiting.iVoiceMsgs;
    }