Reputation: 11
I'm looking for a way to get proximity or ambient light sensor value through javascript for web app development. I know that it's possible on each platform through every native app development.
Upvotes: 1
Views: 2836
Reputation: 411
Currently only Firefox supports proximity sensor API. https://developer.mozilla.org/en-US/docs/Web/API/DeviceProximityEvent
Upvotes: 0
Reputation: 464
You can access a device's proximity sensor through the DeviceProximityEvent event. Unfortunately, at the moment only Firefox for desktop and Firefox for Android support the proximity API: https://developer.mozilla.org/en-US/docs/Web/API/DeviceProximityEvent
Upvotes: 1
Reputation: 26873
Something like PhoneGap might be a good bet. Their API: http://docs.phonegap.com/ .
Upvotes: 0