HapticsPlugin

impact

impact(options: HapticsImpactOptions): void
Trigger a haptics "impact" feedback
options HapticsImpactOptions
Returns: void

notification

notification(options: HapticsNotificationOptions): void
Trigger a haptics "notification" feedback
options HapticsNotificationOptions
Returns: void

selectionChanged

selectionChanged(): void
Trigger a selection changed haptic hint. If a selection was started already, this will cause the device to provide haptic feedback
Returns: void

selectionEnd

selectionEnd(): void
If selectionStart() was called, selectionEnd() ends the selection. For example, call this when a user has lifted their finger from a control
Returns: void

selectionStart

selectionStart(): void
Trigger a selection started haptic hint
Returns: void

vibrate

vibrate(): void
Vibrate the device
Returns: void

addListener

addListener(eventName: string, listenerFunc: Function): PluginListenerHandle
eventName string
listenerFunc Function
Returns: PluginListenerHandle

Interfaces Used

HapticsImpactOptions

interface HapticsImpactOptions {
style : HapticsImpactStyle;
}

HapticsNotificationOptions

interface HapticsNotificationOptions {
type : HapticsNotificationType;
}

HapticsImpactStyle

enum HapticsImpactStyle {
Heavy: "HEAVY"
Light: "LIGHT"
Medium: "MEDIUM"
}

HapticsNotificationType

enum HapticsNotificationType {
ERROR: "ERROR"
SUCCESS: "SUCCESS"
WARNING: "WARNING"
}