HapticFeedback QML Type

Provides access to touch feedback on mobile devices. More...

Import Statement: import ArcGIS.AppFramework.Notifications 1.0

Properties

Methods

  • send(hapticfeedbacktype type)

Detailed Description

The HapticFeedback component provides access to touch feedback technology in a device, allowing for subtle tactile feedback when performing actions within your app. The following code sample demonstrates usage of haptic feedback associated with a button press.

ColumnLayout {
    anchors.fill: parent

    ComboBox {
        id: comboBox
        model: ["Light", "Medium", "Heavy", "Tick", "Success", "Error", "Warning", "Select"]
    }

    Button {
        text: "Send Haptic Feedback"

        onClicked: {
            HapticFeedback.send(comboBox.currentIndex)
        }
    }
}

This functionality is only supported on iOS and Android devices. The Vibration capability must be enabled for this component to function.

Enumerations

HapticFeedbackType enumeration

Enum describing the types of haptic feedback available. Informs the send method.

NameValue
HapticFeedback.HapticFeedbackTypeLight0
HapticFeedback.HapticFeedbackTypeMedium1
HapticFeedback.HapticFeedbackTypeHeavy2
HapticFeedback.HapticFeedbackTypeTick3
HapticFeedback.HapticFeedbackTypeSuccess4
HapticFeedback.HapticFeedbackTypeError5
HapticFeedback.HapticFeedbackTypeWarning6
HapticFeedback.HapticFeedbackTypeSelect7

Property Documentation

[read-only] supported : bool

Returns true if haptic feedback is supported on your device. Otherwise, returns false.


Method Documentation

send(hapticfeedbacktype type)

Triggers the provided type of haptic feedback.

The type parameter

The type of haptic feedback triggered by this method. Informed by the HapticFeedbackType enum.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.