Class DeviceVibration
Provides an easy way to make the device vibrate.
Inherited Members
Namespace: Evergine.Platform
Assembly: Evergine.Platform.dll
Syntax
public class DeviceVibration
Methods
Cancel()
Cancel any current vibrations.
Declaration
public void Cancel()
Remarks
Needs VIBRATE permission set in manifest for Android.
Vibrate()
Vibrate the device fo 500ms.
Declaration
public void Vibrate()
Remarks
Needs VIBRATE permission set in manifest for Android.
Vibrate(TimeSpan)
Vibrate the device for the specified time in the range [0, 5000]ms.
Declaration
public void Vibrate(TimeSpan duration)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | duration | The time to vibrate for. |
Remarks
On iOS, the device will only vibrate for 500ms, regardless of the value specified. Needs VIBRATE permission set in manifest for Android.