- Forum posts: 1
Jan 10, 2017, 1:36:02 AM via Website
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.
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.