VibratorManager.Vibrate Method

Definition

Overloads

Vibrate(CombinedVibration)

Vibrate with a given combination of effects.

Vibrate(CombinedVibration, VibrationAttributes)

Vibrate with a given combination of effects.

Vibrate(CombinedVibration)

Vibrate with a given combination of effects.

[Android.Runtime.Register("vibrate", "(Landroid/os/CombinedVibration;)V", "", ApiSince=31)]
[Android.Runtime.RequiresPermission("android.permission.VIBRATE")]
public void Vibrate (Android.OS.CombinedVibration effect);
[<Android.Runtime.Register("vibrate", "(Landroid/os/CombinedVibration;)V", "", ApiSince=31)>]
[<Android.Runtime.RequiresPermission("android.permission.VIBRATE")>]
member this.Vibrate : Android.OS.CombinedVibration -> unit

Parameters

effect
CombinedVibration

a combination of effects to be performed by one or more vibrators.

Attributes

Remarks

Vibrate with a given combination of effects.

Pass in a CombinedVibration representing a combination of VibrationEffect VibrationEffects to be played on one or more vibrators.

The app should be in foreground for the vibration to happen.

Java documentation for android.os.VibratorManager.vibrate(android.os.CombinedVibration).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Vibrate(CombinedVibration, VibrationAttributes)

Vibrate with a given combination of effects.

[Android.Runtime.Register("vibrate", "(Landroid/os/CombinedVibration;Landroid/os/VibrationAttributes;)V", "", ApiSince=31)]
[Android.Runtime.RequiresPermission("android.permission.VIBRATE")]
public void Vibrate (Android.OS.CombinedVibration effect, Android.OS.VibrationAttributes? attributes);
[<Android.Runtime.Register("vibrate", "(Landroid/os/CombinedVibration;Landroid/os/VibrationAttributes;)V", "", ApiSince=31)>]
[<Android.Runtime.RequiresPermission("android.permission.VIBRATE")>]
member this.Vibrate : Android.OS.CombinedVibration * Android.OS.VibrationAttributes -> unit

Parameters

effect
CombinedVibration

a combination of effects to be performed by one or more vibrators.

attributes
VibrationAttributes

VibrationAttributes corresponding to the vibration. For example, specify VibrationAttributes#USAGE_ALARM for alarm vibrations or VibrationAttributes#USAGE_RINGTONE for vibrations associated with incoming calls.

Attributes

Remarks

Vibrate with a given combination of effects.

Pass in a CombinedVibration representing a combination of VibrationEffect to be played on one or more vibrators.

The app should be in foreground for the vibration to happen. Background apps should specify a ringtone, notification or alarm usage in order to vibrate.

Java documentation for android.os.VibratorManager.vibrate(android.os.CombinedVibration, android.os.VibrationAttributes).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to