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.
Asked
Active
Viewed 2,478 times
1
-
For which mobile OS? iOS/Android/WP7? – TJHeuvel Aug 26 '11 at 08:01
3 Answers
1
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

michaelpoltorak
- 464
- 4
- 6
0
Currently only Firefox supports proximity sensor API. https://developer.mozilla.org/en-US/docs/Web/API/DeviceProximityEvent

Anmol Jain
- 336
- 4
- 12
0
Something like PhoneGap might be a good bet. Their API: http://docs.phonegap.com/ .

Juho Vepsäläinen
- 26,573
- 12
- 79
- 105