RE: When should a Device API be exposed? Re: Atmospheric pressure sensosr API

Marcos wrote:
> Sorry.. dumb question, but I can't ever remember the answer: if a hardware (or
> similar) capability is not available on the host device, should the API be exposed
> by the UA? I thought I had read somewhere (HTML spec? WebIDL?) that the UA
> should not expose the API when the capability is not available.
> 
> I'm asking because I saw the following in the Atmospheric API proposal: "Not all
> devices contain a barometer, and when there is no barometer, this API is still
> exposed to the scripting environment but it does nothing".

Yeah, that runs counter to the behavior we generally accept.

This entire approach is also why I'd much rather we do these APIs as Intents.

Doing it as an Intent allows the host to provide a host-OS/Device based Intent provider if it's available, but allows the user to connect a web service or Bluetooth device or whatever if they want to interact with the application but their hardware/OS doesn't have the necessary support.

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

Received on Friday, 7 September 2012 14:29:04 UTC