Voice Privacy Settings Tutorial

This tutorial describes how to get and set the voice privacy settings.

The RMobilePhone API provides methods to access the device default setting for the CDMA-specific Voice Privacy service. Depending on the setting of the Voice Privacy, the phone requests privacy to be on or off for all outgoing and incoming calls.

  1. Get the current setting using RMobilePhone::GetDefaultPrivacy(). Possible settings are described in the RMobilePhone::TMobilePhonePrivacy enumeration.
  2. Set the Voice Privacy setting using RMobilePhone::SetDefaultPrivacy().
  3. Use RMobilePhone::NotifyDefaultPrivacyChange() to get the notificationof any changes to the voice privacy settings.

Voice privacy settings example

The following code gets the current Voice Privacy setting, and checks if it is off.

The code assumes iMobilePhone is an RMobilePhone object.

RMobilePhone::TMobilePhonePrivacy mobilePhonePrivacy;
User::LeaveIfError(iMobilePhone.GetDefaultPrivacy(mobilePhonePrivacy)); 
if (mobilePhonePrivacy == RMobilePhone::EPrivacyOff)
    {
     //do something
    }