10-25-2012 05:42 PM
I saw that you can do vibrate in BB10 WebWorks here:
" navigator.vibrate is supported already "
I have tried navigator.vibrate I can't get it to work. I tried navigator.vibrate, navigator.vibrate(); navigator.vibrate(1000), navigator.vibrate([50, 100, 150]);
Does anyone know how to get it to work? Do you need a permissions element in the config?
Solved! Go to Solution.
10-26-2012 11:31 AM - edited 10-26-2012 12:59 PM
I just tried three different cases: 1st try: navigator.webkitvibrate; 2nd try: navigator.webkitvibrate(2000); 3rd try: navigator.webkitvibrate([50, 100, 150]); And it didn't work for me.
I needed the capitalized "V"!
Although with that code it keeps vibrating. It doesn't go for just 2 seconds. I'll keep experimenting.
With brackets it will work for the 2 seconds.
This successfully did the pattern too:
12-18-2012 04:00 AM
Hi Nukul and all others,
something changed in the API for virbation? I'm searching an event handler to make differentiate between playing a sound or vibrate in my App, but I couldn't find anything about it and you sample
is throwing a:
TypeError: Type error
Is there a bug in the latest BB10 Version 10.0.9.1675 or something missing in the HTML5 documentation?
12-18-2012 08:40 AM - edited 12-18-2012 08:42 AM
I always get a type error with this when directly calling the navigator.vibrate(1000) in Web Inspector:
TypeError: Type error line: 2 message: "Type error" stack: "vibrate@[native code]↵eval code↵eval@[native code]↵evaluate@[native code]↵_evaluateOn↵_evaluateAndWrap↵evaluate↵[nativ
e code]" > __proto__: Error
Is there something to be added to the config.xml for it to work?
BTW: Is there an event handler/listener to be able to vibrate instead of playing a sound if the BB10's volume is down/muted?
01-14-2013 05:19 AM
Any news on navigator.vibrate.
I'm running the latest BB10 SDK version 188.8.131.52 and BB10 Dev Alpha "A" OS version 10.0.9.2320 [10.9.9.339] but it doesn't work.
I always get the same errors running the samples provided by Nukul.