1

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.

TonySalimi
  • 8,257
  • 4
  • 33
  • 62

3 Answers3

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