How to access proximity sensor data to use it as variable in JS? What is the data type of proximity sensor data?
These two links might help you explore the things you are looking for:
here is a link make a ajax request and get the data
try the suggestion from here