Interrupting A Vibration Pattern And Starting A New One Without Issues

  • Replies:0
Jack Robin
  • Forum posts: 1

Jan 10, 2017, 1:36:02 AM via Website

Hello, I am starting a vibration pattern using:

v.vibrate(pattern, -1);

It works without problems. Though, I want to allow the user to interrupt it and start a new pattern. I have tried cancelling the vibration:

vib.cancel();

Though, when I start the new pattern after cancelling. It does not work properly. It is as if there is a residual vibration from the first pattern placed on the second pattern. So, I guess I need to find a way to fully reset the vibration after cancelling. I have tried the documentation without luck. I have tried placing the vib code inside a new thread then interrupting the thread. That did not work. I have even thought of turning the vibration settings on and off. That no longer works in new apis, sadly. I have ran out of ideas. Can someone point me in the right direction to interrupting the vibrator and starting fresh?

Thanks.

Reply