W3C home > Mailing lists > Public > public-device-apis@w3.org > August 2014

RE: Vibration spec and Cordova integration update

From: Lisa Seacat DeLuca <ldeluca@us.ibm.com>
Date: Thu, 7 Aug 2014 14:20:32 -0400
To: Adrian Bateman <adrianba@microsoft.com>
Cc: Device APIs Working Group <public-device-apis@w3.org>
Message-ID: <OF925E5264.A0648424-ON87257D2D.00513031-85257D2D.0064C411@us.ibm.com>
Adrian & DAP team~

Here's how Cordova is handling the Windows limitations on vibration 
length.  Rather than throw an error, if the vibration time is less than 1, 
the device vibrates for a length of 1.  If the vibration time is 5000 or 
more, the time is truncated to 5000.

This is documented within the vibration plugin docs: 
https://github.com/apache/cordova-plugin-vibration/blob/master/doc/index.md

Please let me know if you see any issues with the documentation,


Lisa

Lisa Seacat DeLuca
Mobile Engineer | t: +415.787.4589 | ldeluca@apache.org | | 
ldeluca@us.ibm.com | lisaseacat.com | | 





From:   Adrian Bateman <adrianba@microsoft.com>
To:     Lisa Seacat DeLuca/San Francisco/IBM@IBMUS, Device APIs Working 
Group <public-device-apis@w3.org>
Date:   08/06/2014 12:08 PM
Subject:        RE: Vibration spec and Cordova integration update



On Thursday, July 24, 2014 7:13 AM, Lisa Seacat DeLuca wrote:
> Windows Phone - when a vibration duration value is entered that is over 
5000 the windows
> platform ignores the event.  Within Cordova we will document this 
shortcoming.  If
> someone has a connection with the windows team it would be interesting 
to get their
> take on this.  They might not be aware.  I would expect it to at least 
vibrate for 5000
> and then not acknowledge anything larger if that is their intent. 

The Windows Phone behaviour is documented in MSDN:
http://msdn.microsoft.com/en-us/library/windows/apps/jj206994#BKMK_Durationofthevibration


The API throws an exception for out of range arguments. It sounds like you 
are not catching
the exception?

Cheers,

Adrian.



picture
(image/png attachment: 01-part)

picture
(image/png attachment: 02-part)

Received on Thursday, 7 August 2014 18:21:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:33:11 UTC