-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Use case
When notifying the user of the success or failure of an action through vibration, I would like to use the standard API on iOS.
As an alternative, I am currently using one of HapticFeedback's heavyImpact/lightImpact/mediumImpact/selectionClick/vibrate, but this does not provide the expected vibration feedback on iOS.
Proposal
iOS provides an API called UINotificationFeedbackGenerator, which is designed to notify users of the outcome of an action. While HapticFeedback currently supports three types of vibration (UIImpactFeedbackGenerator, UISelectionFeedbackGenerator, and kSystemSoundID_Vibrate), adding UINotificationFeedbackType’s success/warning/error would allow for standard vibration notifications for the success or failure of a user action. Therefore, it would be great if the following HapticFeedback API could be provided:
- success(): UINotificationFeedbackType.success on iOS, HapticFeedbackConstants.CONFIRM on Android
- warning(): UINotificationFeedbackType.warning on iOS, HapticFeedbackConstants.REJECT on Android
- error(): UINotificationFeedbackType.error on iOS, HapticFeedbackConstants.REJECT on Android
Note that there may be room for discussion regarding warning(), as there is no direct equivalent on Android.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status