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

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:48 UTC