Sony SmartWatch2: want to change advanced vibration patterns

234 views Asked by At

This is a part of examples, HelloEvents, on Sony addon sdk' examples.

I've managed to access the startVibrator and change vibrations successfully on SmartWatch2.

But, I want to change the vibration pattern more details such as pattern like android vibrate, eg.{500,500,500,500,1000,1000,1000,1000}.

So, I used startVibrator twice, but it didn't work. It just did last one(startVibrate(1000,1000,2)).

for example,

 if (event.getAction() == Control.Intents.TOUCH_ACTION_RELEASE) {`enter code here`
            if (mTouchRect.contains(event.getX(), event.getY())) {
                sendEventToActivity(EventType.TOUCH, event.getX() + ", " + event.getY());

                startVibrator(500, 500, 2); // not working 
                startVibrator(1000,1000,2); // only working 
                }        
             }

Any help would be appreciated.

Thank you.

1

There are 1 answers

0
peter.bartos On

The second vibration pattern is overriding the first one. You need to send it, after the first pattern is complete. You can do that for example by using postDelayed, where the delay will be the total duration of your first pattern.