ISSUE-171: Returning false if vibration hardware is not present or using hasVibration? (prefer promises)

Returning false if vibration hardware is not present or using hasVibration? (prefer promises)

State:
RAISED
Product:
Vibration API
Raised by:
Adam Alfar
Opened on:
2016-01-19
Description:
[from email at https://lists.w3.org/Archives/Public/public-device-apis/2016Jan/0050.html ]

The vibration api is currently spec'd to return false from vibrate(...) if the page is not visible or (optionally) if the user has disabled vibration. Can the spec be amended to return false if vibration hardware is not present too?

Some mobile devices such as the Nexus 7 do not have hardware support for vibration. I'd like to provide feedback to users when their hardware doesn't support vibration. There is an Android API for accessing this: Vibration.hasVibrator(), though I couldn't find an API on iOS.

Ideally we would return a promise but that change is probably not web compatible. Another option is to add something like hasVibrator(). Because false is already returned for a variety of cases where vibration is not possible, I think it makes sense to also return false when hardware support prevents vibration.
Related Actions Items:
No related actions
Related emails:
  1. Re: [admin] Agenda - DAP Distributed Meeting 18 February 2016 (from tobie@sensors.codespeaks.com on 2016-02-18)
  2. [admin] Agenda - DAP Distributed Meeting 18 February 2016 (from w3c@fjhirsch.com on 2016-02-15)
  3. [admin] Draft Minutes from 2016-02-04 DAP teleconference (from w3c@fjhirsch.com on 2016-02-04)
  4. Re: [admin] Agenda - DAP Distributed Meeting 4 February 2016 (from alogvinov@yandex-team.ru on 2016-02-04)
  5. Re: DAP-ISSUE-171: Returning false if vibration hardware is not present or using hasVibration? (prefer promises) [Vibration API] (from lukasz.w3c@gmail.com on 2016-02-03)
  6. Re: [admin] Agenda - DAP Distributed Meeting 4 February 2016 (from dom@w3.org on 2016-02-03)
  7. [admin] Agenda - DAP Distributed Meeting 4 February 2016 (from w3c@fjhirsch.com on 2016-02-02)
  8. Re: DAP-ISSUE-171: Returning false if vibration hardware is not present or using hasVibration? (prefer promises) [Vibration API] (from w3c@fjhirsch.com on 2016-02-02)
  9. Re: DAP-ISSUE-171: Returning false if vibration hardware is not present or using hasVibration? (prefer promises) [Vibration API] (from lukasz.w3c@gmail.com on 2016-02-02)
  10. Re: DAP-ISSUE-171: Returning false if vibration hardware is not present or using hasVibration? (prefer promises) [Vibration API] (from anssi.kostiainen@intel.com on 2016-02-02)
  11. Re: DAP-ISSUE-171: Returning false if vibration hardware is not present or using hasVibration? (prefer promises) [Vibration API] (from lukasz.w3c@gmail.com on 2016-01-31)
  12. DAP-ISSUE-171: Returning false if vibration hardware is not present or using hasVibration? (prefer promises) [Vibration API] (from sysbot+tracker@w3.org on 2016-01-19)

Related notes:

No additional notes.

Display change log ATOM feed


Anssi Kostiainen <anssi.kostiainen@intel.com>, Reilly Grant <reillyg@google.com>, Chairs, Fuqiao Xue <xfq@w3.org>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 171.html,v 1.1 2019/11/08 08:58:24 carcone Exp $