Share via


InputDevice.Vibrator Property

Definition

Gets the vibrator service associated with the device, if there is one.

public Android.OS.Vibrator? Vibrator { [Android.Runtime.Register("getVibrator", "()Landroid/os/Vibrator;", "")] get; }
[<get: Android.Runtime.Register("getVibrator", "()Landroid/os/Vibrator;", "")>]
member this.Vibrator : Android.OS.Vibrator

Property Value

The vibrator service associated with the device, never null.

Attributes

Remarks

Gets the vibrator service associated with the device, if there is one. Even if the device does not have a vibrator, the result is never null. Use Vibrator#hasVibrator to determine whether a vibrator is present.

Note that the vibrator associated with the device may be different from the system vibrator. To obtain an instance of the system vibrator instead, call Context#getSystemService with Context#VIBRATOR_SERVICE as argument.

This member is deprecated. Use #getVibratorManager() to retrieve the default device vibrator.

Java documentation for android.view.InputDevice.getVibrator().

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