Share via


AccessoryManager.SetRingerVibrate(Boolean, Boolean) Method

Definition

An accessory can toggle on and off the ringer and vibrate settings on the phone.

public:
 static void SetRingerVibrate(bool ringer, bool vibrate);
 static void SetRingerVibrate(bool const& ringer, bool const& vibrate);
public static void SetRingerVibrate(bool ringer, bool vibrate);
function setRingerVibrate(ringer, vibrate)
Public Shared Sub SetRingerVibrate (ringer As Boolean, vibrate As Boolean)

Parameters

ringer
Boolean

bool

true if ringer is on; otherwise false.

vibrate
Boolean

bool

true if vibrate mode is on; otherwise false.

Windows requirements

App capabilities
accessoryManager

Remarks

Calling this API requires that the ID_CAP_SMS and ID_CAP_SMS_COMPANION capabilities be specified in the application manifest.

To set the phone to vibrate with no ringer, call this method passing (false, true). To set the phone ringer on and vibrate off, call passing (true, false). To set the ringer on and vibrate on, call passing (true, true). To set the phone ringer and vibrate off, call passing (false, false).

Applies to