Android Guides | Samples

Android.OS.Vibrator Class

Class that operates the vibrator on the device.

See Also: Vibrator

Syntax

[Android.Runtime.Register("android/os/Vibrator", DoNotGenerateAcw=true)]
public abstract class Vibrator : Object

Remarks

Class that operates the vibrator on the device. To obtain an instance of the system vibrator, call Context.GetSystemService(String) with Context.VibratorService as the argument.

If your process exits, any vibration you started will stop.

[Android Documentation]

Requirements

Namespace: Android.OS
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.OS.Vibrator are listed below.

See Also: Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
abstract
HasVibratorBoolean. Check whether the hardware has a vibrator.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

abstract
Cancel()
Turn the vibrator off.
static
FromContext(Context) : Vibrator
Vibrate(Int64)
Vibrate constantly for the specified period of time.
Vibrate(Int64, AudioAttributes)
Vibrate constantly for the specified period of time.
Vibrate(Int64[], Int32)
Vibrate with a given pattern.
Vibrate(Int64[], Int32, AudioAttributes)
Vibrate with a given pattern.