Provides access to touch feedback on mobile devices. More...
Import Statement: | import ArcGIS.AppFramework.Notifications 1.0 |
Properties
- supported : bool
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.
Name | Value |
---|---|
HapticFeedback.HapticFeedbackTypeLight | 0 |
HapticFeedback.HapticFeedbackTypeMedium | 1 |
HapticFeedback.HapticFeedbackTypeHeavy | 2 |
HapticFeedback.HapticFeedbackTypeTick | 3 |
HapticFeedback.HapticFeedbackTypeSuccess | 4 |
HapticFeedback.HapticFeedbackTypeError | 5 |
HapticFeedback.HapticFeedbackTypeWarning | 6 |
HapticFeedback.HapticFeedbackTypeSelect | 7 |
Property Documentation
Returns true if haptic feedback is supported on your device. Otherwise, returns false.
Method Documentation
Triggers the provided type of haptic feedback.
The type parameter
The type of haptic feedback triggered by this method. Informed by the HapticFeedbackType enum.