Is the proximity sensor an on off state ! ..or the value is a propotional to the measured distance.
When proximity is on a value 0 is triggered.
Is the max value equal for all devices ?
B4X:
Sub ps_SensorChanged (Values() As Float)
Log(Values(0))
End Sub
It can change between different devices. Though in the devices I tested it there were only two values (don't remember whether the maximum value was constant or not).