Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Create vibration pattern like Samsung

I'm trying to create a View with touch events to create a vibration pattern like samsung does.

enter image description here

I use CountDownTimer to start recording during 5 seconds. I want to catch ACTION_DOWN and ACTION_UP events from touch.

Are there a library to create this circle view with the timer animation? Any suggestions?

like image 510
jzafrilla Avatar asked Feb 17 '26 20:02

jzafrilla


1 Answers

If you can keep track of the timer in something like milliseconds, you can log the action down and action up with the time.

Example: Action down @ Second 1 Action up @ Second 1.5

When you try to recreate this, you can rebuild the same way you recorded. Start a timer, and when Second = 1, vibrate. When second = 1.5, stop vibrating

like image 167
apriscott Avatar answered Feb 19 '26 12:02

apriscott



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!