Languages

Menu
Sites
Language
How can I get the Galaxy watch to vibrate?

I'm developing an app on a Galaxy Neo.  I'm trying to get the watch to vibrate when certian things in the app.  Going through the docs I'm assuming I need to use a notification but when I copy the example in the documentation I get this error:

TypeError: 'undefined' is not a constructor (evaluating 'new tizen.StatusNotification("SIMPLE","Simple notification", notificationDict)')

Anyone know what's up?  

Here's the documentation I'm referring to:

https://developer.tizen.org/documentation/articles/notifications

 

Thanks.

View Selected Answer

Responses

4 Replies
Mark as answer

navigator.vibrate()

Michael Piccuirro

Actually it's 

            navigator.vibrate(1000);

Would you be able to point me to where this is stated in the documentaion?  Thanks for the help. 

Yes I know, but you can also set a pattern instead of one second (1000)

 

/* Vibrate in a given pattern: 1 sec on, 1 sec off, 2 sec on, 2 sec off */     

navigator.vibrate([1000, 1000, 2000, 2000, 1000]);

 

You can find it on the docs

Tizen Wearable Web App Programming > Tutorials > W3C/HTML5 Tutorials > Device Tutorials > Vibration API Tutorial

As you can see, it is W3C HTML5 tutorial and not Tizen. Sometimes you have to search web APIs

Michael Piccuirro

Ah there it is, an acticle titled "Vibration API: Managing the Vibration Mechanism".

And it does not come up in the results when you search "vibration".  

Thanks again.