W3C home > Mailing lists > Public > public-device-apis@w3.org > November 2011

Re: [vibra] Vibration API -- the first stab

From: Anssi Kostiainen <anssi.kostiainen@nokia.com>
Date: Tue, 1 Nov 2011 15:13:07 -0700
Cc: Dominique Hazael-Massieux <dom@w3.org>, "public-device-apis@w3.org WG" <public-device-apis@w3.org>, <public-device-status@w3.org>
Message-Id: <8094084C-67E1-459E-93B0-1DA4F7898EC4@nokia.com>
To: ext Dave Raggett <dsr@w3.org>
On 28.10.2011, at 4.59, ext Dave Raggett wrote:

> It might be worth comparing features against the Android Vibrator API, see:
> 
> http://developer.android.com/reference/android/os/Vibrator.html
> 
> This offers a repeat count for the pattern, as well as a simple vibrate for so many milliseconds:
> 
>    void vibrate(long[] pattern, int repeat)
>    void vibrate(long milliseconds)

Given that pattern can handle repetition, do you have a use case in mind that would require repeat?

> There is also
> 
>    boolean hasVibrator()

hasVibrator() sounds a lot like hasFeature() which did not work too well.

>   void cancel()

Would cancel() be a significant improvement over vibrate(0) or (vibrate([])? What do people think?

> p.s. I have been playing with exposing the vibrator as a restful service (no pun intended) as part of my work on a service discovery demo for Android phones, which I look forward to an opportunity for showing to the DAP WG next week in Santa Clara.

It'd be great if you could show the demo on Thursday, perhaps right after the Vibration discussion before the first break which is scheduled to start at 10 am.

-Anssi
Received on Tuesday, 1 November 2011 22:13:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:24 GMT