A quick read on Android haptic feedback Design principles
Tags: android, mobile, kotlin, tristan
Published: 2024-04-26 02:35:40

### Table of contents
1. [Haptic design principles in theory](#suc)
2. [Haptic design principles in implementation](#sprint)
3. [How I am using haptic feedback](#last)

### My app on the Google play store
- [The app](https://play.google.com/store/apps/details?id=elliott.software.clicker)

### Resources
- [Haptic design principles](https://developer.android.com/develop/ui/views/haptics/haptics-principles)
- [Create custom haptic effects](https://developer.android.com/develop/ui/views/haptics/custom-haptic-effects)
- [Why are GOOD haptic feedback underappreciated in Android?](https://www.reddit.com/r/Android/comments/13qx2cw/why_are_good_haptic_feedback_underappreciated_in/)


### Haptic design principles in theory <a name="suc">
- The official [haptic design principle documentation](https://developer.android.com/develop/ui/views/haptics/haptics-principles) tells us that less is more when it comes to haptic feedback and gives us 3 main use cases:

`1) To notify the user of an event that needs their attention`

`2) To confirm a state change in the device following a user action`

`3) To delight the user with effects`


### Haptic design principles in implementation <a name="sprint">
- If we look at some of the largest applications such as, YouTube, Instagram, TikTok and even Threads. We will notice some patterns that start to emerge in the implementation of haptic feedback. If theses patterns are not found in their Android applications, then they most certainly found in their IOS application

`1) Pull to refresh :` Once the threshold for pull to refresh is reached one single haptic event takes place, such as [HapticFeedbackConstants.CONFIRM](https://developer.android.com/develop/ui/views/haptics/haptic-feedback#use_view_example_2) 

`2) Events that will change the users overall experience`: This pattern is a little more broad and subjective but usually arises when the main user of the application follow/unfollows another account. Overall, an action is taken place that will cause the user to have a noticeable change in their user experience. A single haptic feedback event takes place. Such as, [HapticFeedbackConstants.CONFIRM](https://developer.android.com/develop/ui/views/haptics/haptic-feedback#use_view_example_2) 

`3) Major failure` : When an major action fails, ie, the user makes a request but there is a network failure or some other event occurs and the request is rejected. This failure should be large enough that the function of the application or user experience is hindered. Once this happens there should be a distinct haptic feedback event. Such as, [HapticFeedbackConstants.REJECT](https://developer.android.com/develop/ui/views/haptics/haptic-feedback#use_view_example_2) 


### How I am using Haptic feedback in my application <a name="last">
- As mentioned previously, when it comes to haptic feedback less is more. So if you are unsure about if you want to use haptic feedback, it is best to error on the side of caution and not use it. However, I will be using it for 2 patterns that we have previously mentioned: 

`1) Major failures`
`2) Pull to refresh `



### Conclusion 
- Thank you for taking the time out of your day to read this blog post of mine. If you have any questions or concerns please comment below or reach out to me on [Twitter](https://twitter.com/AndroidTristan).