{"id":5027,"date":"2021-12-21T20:56:32","date_gmt":"2021-12-21T12:56:32","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=5027"},"modified":"2022-04-08T19:53:08","modified_gmt":"2022-04-08T11:53:08","slug":"enable-proximity-sensor","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/react-native-toolkit\/enable-proximity-sensor\/","title":{"rendered":"Enable Proximity Sensor: React Native SDK \u2013 Video API"},"content":{"rendered":"\n<p>The <code>Enx.enableProximitySensor()<\/code> enables the Camera to detect the proximity. On most devices, the Proximity Sensor is implemented as a boolean-sensor. <\/p>\n\n\n\n<ul><li>It returns just two values <code>NEAR <\/code>or <code>FAR<\/code>. <\/li><li>Thresholding is done on the LUX value i.e. the LUX value of the light sensor is compared with a threshold.<\/li><li>A LUX-value more than the threshold means the Proximity Sensor returns <code>FAR<\/code>.<\/li><li>Anything less than the threshold value, the sensor returns <code>NEAR<\/code><\/li><\/ul>\n\n\n\n<p><strong>Class:&nbsp;<\/strong><code>Enx<\/code><\/p>\n\n\n\n<p><strong>Method: <code>Enx.enableProximitySensor(boolean status)<\/code><\/strong><code> <\/code><\/p>\n\n\n\n<p><strong>Parameters:&nbsp;<\/strong><\/p>\n\n\n\n<p><code>status<\/code> \u2013 Boolean. Set to <em>true<\/em> to enable and <em>false<\/em> to disable Proximity Sensor.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Enx.enableProximitySensor(true); \/\/ Enable Sensor<\/pre>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<p>\u2190 <a href=\"..\/pre-call-test\/\"><\/a><a href=\"..\/pre-call-test\/\">Pre-Call Test<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-center\"><a href=\"..\/\">Index<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-right\"><a href=\"..\/enx\/\"><\/a><a href=\"..\/enx\/\">Enx \u2013 The React Native Bridge<\/a> \u2192<a href=\"\/developer\/how-to-use\/\"><\/a><\/p>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Enx.enableProximitySensor() enables the Camera to detect the proximity. On most devices, the Proximity Sensor is implemented as a boolean-sensor. It returns just two values NEAR or FAR. Thresholding is done on the LUX value i.e. the LUX value of the light sensor is compared with a threshold. A LUX-value more than the threshold means the Proximity Sensor returns FAR. Anything less than the threshold value, the sensor returns NEAR&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3747,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ub_ctt_via":""},"featured_image_src":null,"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"featured":false,"featured-large":false},"uagb_author_info":{"display_name":"vcxdevwpadmin","author_link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/author\/vcxdevwpadmin\/"},"uagb_comment_info":0,"uagb_excerpt":"The Enx.enableProximitySensor() enables the Camera to detect the proximity. On most devices, the Proximity Sensor is implemented as a boolean-sensor. It returns just two values NEAR or FAR. Thresholding is done on the LUX value i.e. the LUX value of the light sensor is compared with a threshold. A LUX-value more than the threshold means&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/5027"}],"collection":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/comments?post=5027"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/5027\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3747"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=5027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}