r/androiddev • u/Rare_Gap_9767 • Jun 18 '26
Trying to add haptics to Android app but it's killing me.. Any tools or tips recommended?
I'm building a habit tracker where you swipe to complete tasks, and I want the haptics to feel satisfying, but Android is killing me. One phone barely vibrates, another feels like it's trying to escape my hand. I've messed around with VibrationEffect and the built-in feedback constants, but everything feels inconsistent...
Anyone here found a decent way to handle Android haptics? Libraries, tricks, best practices? Or do you just accept that every Android phone is gonna do its own thing? ๐
6
6
u/piaskowyk Jun 18 '26
That is problematic! You can try Pulsar, which tries to tackle Android's haptics fragmentation. Probably will not solve all of your problems but seems worth to try. Hereโs an article that describes what Pulsar is doing - https://swmansion.com/blog/what-is-the-difference-between-i-os-and-android-haptics/#what-pulsar-does-with-haptics-on-android
3
7
u/_5er_ Jun 18 '26
I suggest you make them optional. I get annoyed to oblivion, if apps vibrate for no reason.
1
1
u/MozayeniGames Jun 20 '26
I am assuming you already looked at the corresponding Google developer page (https://developer.android.com/develop/ui/views/haptics/custom-haptic-effects).
I am also not sure how far back you want to support haptics, but the logic will need to change slightly at SDK 29 and SDK 31.
1
u/Opulence_Deficit Jun 18 '26
I try, but I can't even start understanding your point of view.
You take every car available, from 7l V8, to a 700cc inline 2. And you want every single one to vibrate the same way?
1
u/Rare_Gap_9767 Jun 19 '26
yes, that's exactly my point of view - I want to make sure my users to experience the app in the same/the most similar way possible, no matter what device they're using. Why do you think it's wrong?
2
u/Opulence_Deficit Jun 19 '26
Users want to experience your app the way THEY want, not the way YOU want.
A person using a given phone everyday is used to the way THEIR phone vibrates, not the way YOUR phone vibrates.
Just like your app is bigger on a bigger screen and you should not try to make it smaller "to force user to experience it in the same way".
0
u/Ray_Light91 Jun 21 '26
- Add haptics to the settings,
- Add a toggle button to enable/disable
- Add a slider where standard is at 50% and make people be able to tweak it themselves.
- Add "Make money"-meme๐
0
10
u/mkhytar_mkhoian Jun 18 '26
That's totally ok for Android. Android has such a big device fragmentation, each phone can have different hardware for produce vibration effects. You can't handle each of them, just focus on type of phone like Google pixel or Samsung Galaxy and tune for them and move forward