Proximity sensor

Proximity sensors are also known as position sensors and allow you to determine how close your smartphone is to an object (such as your face). The distance can be measured in cm. However, most proximity sensors only return Far/Near information. Therefore, the return value will be 0 or 1, where 0/LOW is Far and 1/HIGH is Near.

As usual, you can add a Proximity Sensor widget to your project canvas from the Widget Box (Figure 6.19):

Figure 6.19: Proximity Sensor widget
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.218.230