{"id":255437,"date":"2015-04-17T12:45:02","date_gmt":"2015-04-17T08:45:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=255437"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=255437","title":{"rendered":"\u041a\u0430\u043a \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u044c \u0434\u0435\u043d\u044c \u043e\u0442 \u043d\u043e\u0447\u0438, \u0435\u0441\u043b\u0438 \u0442\u044b Android"},"content":{"rendered":"<br \/>\n<h4>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440.<\/h4>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0437\u0434\u043e\u0440\u043e\u0432\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0442\u0435\u043c\u043d\u043e\u0442\u0435. \u0412 \u0434\u0435\u0442\u0441\u0442\u0432\u0435 \u043d\u0430\u043c \u0432\u0441\u0435\u043c \u043c\u0430\u043c\u044b \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u043b\u0438 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u044b! \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0431\u0443\u043c\u0430\u0436\u043d\u044b\u0445 \u043a\u043d\u0438\u0433, \u043d\u0430 \u043d\u0438\u0445 \u043d\u0435 \u043d\u0430\u0434\u043e \u0441\u0432\u0435\u0442\u0438\u0442\u044c \u0444\u043e\u043d\u0430\u0440\u0438\u043a\u043e\u043c, \u043e\u043d\u0438 \u0441\u0430\u043c\u0438 \u0437\u0430 \u0432\u0430\u0441 \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u044e\u0442. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u044b \u0438\u0445 \u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0430\u0435\u043c. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u0431\u043e \u0432\u0441\u0435\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/fef\/a0b\/f7d\/fefa0bf7d8954cf2b19094262875e0cb.PNG\"\/><br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0412 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e\u0434 Android, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438, \u0435\u0441\u0442\u044c \u044d\u043a\u0440\u0430\u043d \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043c\u044b \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0432 \u043d\u0451\u043c \u0434\u0432\u0430 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u2013 \u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0438 \u043d\u043e\u0447\u043d\u043e\u0439. \u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u0435\u0441\u043b\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u00ab\u0437\u043d\u0430\u0435\u0442\u00bb, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u0435\u043d\u044c (\u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0432\u0435\u0442\u043b\u043e), \u2013 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d, \u0441 \u0447\u0451\u0440\u043d\u044b\u043c \u0448\u0440\u0438\u0444\u0442\u043e\u043c \u043d\u0430 \u0431\u0435\u043b\u043e\u043c. \u0415\u0441\u043b\u0438 \u0436\u0435 \u043e\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432 \u0442\u0435\u043c\u043d\u043e\u0442\u0435, \u2013 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0435\u043c\u0443 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0432 \u043d\u043e\u0447\u043d\u043e\u0439 \u0440\u0435\u0436\u0438\u043c \u2013 \u0431\u0435\u043b\u044b\u0439 \u0448\u0440\u0438\u0444\u0442 \u0438 \u0447\u0451\u0440\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d.<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/2a7\/353\/8b2\/2a73538b24ed4ac89c84b315a225d4be.png\"\/><img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/c25\/32e\/4db\/c2532e4db9f542a8a4d12ad638d61818.png\"\/><\/p>\n<p>  \u0421\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2013 \u044d\u0442\u043e \u0432\u043e\u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c, \u0434\u0435\u043d\u044c \u0441\u0435\u0439\u0447\u0430\u0441 \u0438\u043b\u0438 \u043d\u043e\u0447\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0435\u043d\u0441\u043e\u0440\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<\/p>\n<p>  \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043b\u044e\u0431\u044b\u043c \u0441\u0435\u043d\u0441\u043e\u0440\u043e\u043c \u0432 Android \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u0430\u043c:<br \/>  1. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a <a href=\"http:\/\/developer.android.com\/reference\/android\/hardware\/SensorManager.html\">SensorManager<\/a>.<br \/>  2. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u043c\u0443 \u0441\u0435\u043d\u0441\u043e\u0440\u0443.<br \/>  3. \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c listener, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0431\u0449\u0438\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0435\u043d\u0441\u043e\u0440\u043e\u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 SensorManager:<\/p>\n<pre><code class=\"java\">public class SensorActivity extends Activity, implements SensorEventListener {      private final SensorManager sensorManager;      private final Sensor accelerometer;        public SensorActivity() {          sensorManager = (SensorManager)getSystemService(SENSOR_SERVICE);          accelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT); \/\/\u0414\u0430\u0442\u0447\u0438\u043a \u043e\u0441\u0432\u0435\u0449\u0451\u043d\u043d\u043e\u0441\u0442\u0438      }        protected void onResume() {          super.onResume();          sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_NORMAL); \/\/\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0441\u0435\u043d\u0441\u043e\u0440\u0443      }        protected void onPause() {          super.onPause();          sensorManager.unregisterListener(this); \/\/\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043e\u0442 \u0441\u0435\u043d\u0441\u043e\u0440\u0430      }        public void onAccuracyChanged(Sensor sensor, int accuracy) {      }        public void onSensorChanged(SensorEvent event) {         \/\/\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 SensorEvent      }  } <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 \u0441\u0435\u043d\u0441\u043e\u0440\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 <a href=\"http:\/\/http:\/\/developer.android.com\/reference\/android\/hardware\/SensorEvent.html#values\">SensorEvent#values<\/a>. <br \/>  \u041f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432\u043e\u0442, \u0447\u0442\u043e \u043f\u0440\u0438\u0441\u044b\u043b\u0430\u0435\u0442 \u043d\u0430\u043c \u0441\u0435\u043d\u0441\u043e\u0440 \u043e\u0441\u0432\u0435\u0449\u0451\u043d\u043d\u043e\u0441\u0442\u0438:<\/p>\n<p>  <i>Sensor.TYPE_LIGHT:<br \/>  values[0]: Ambient light level in SI lux units<\/i><\/p>\n<p>  \u0412\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u044e\u043a\u0441\u043e\u0432.<\/p>\n<h4>\u041c\u0438\u043d\u0443\u0442\u043a\u0430 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h4>\n<p>  \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043b\u044e\u043a\u0441? \u041d\u0443, \u0442\u0443\u0442 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u043b\u044e\u043a\u0441 \u2014 \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u043e\u0441\u0432\u0435\u0449\u0451\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 1\u043c\u00b2 \u043f\u0440\u0438 \u0441\u0432\u0435\u0442\u043e\u0432\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u043d\u0430 \u043d\u0435\u0451 \u0438\u0437\u043b\u0443\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0432\u043d\u043e\u043c 1 \u043b\u043c (\u043b\u044e\u043c\u0435\u043d). \u0410 \u043b\u044e\u043c\u0435\u043d \u2014 \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0441\u0432\u0435\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430, \u0440\u0430\u0432\u043d\u0430\u044f \u0441\u0432\u0435\u0442\u043e\u0432\u043e\u043c\u0443 \u043f\u043e\u0442\u043e\u043a\u0443, \u0438\u0441\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u043e\u043c\u0443 \u0442\u043e\u0447\u0435\u0447\u043d\u044b\u043c \u0438\u0437\u043e\u0442\u0440\u043e\u043f\u043d\u044b\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c, c \u0441\u0438\u043b\u043e\u0439 \u0441\u0432\u0435\u0442\u0430, \u0440\u0430\u0432\u043d\u043e\u0439 \u043e\u0434\u043d\u043e\u0439 \u043a\u0430\u043d\u0434\u0435\u043b\u0435, \u0432 \u0442\u0435\u043b\u0435\u0441\u043d\u044b\u0439 \u0443\u0433\u043e\u043b \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u043e\u0439 \u0432 \u043e\u0434\u0438\u043d \u0441\u0442\u0435\u0440\u0430\u0434\u0438\u0430\u043d. \u0410 \u0441\u0442\u0435\u0440\u0430\u0434\u0438\u0430\u043d \u2014 \u044d\u0442\u043e\u2026 \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443:<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/ad0\/f3c\/58a\/ad0f3c58a08a4ef1b52e07afe267344a.jpg\"\/><\/p>\n<p>  (\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a <a href=\"http:\/\/blog.tredz.co.uk\/wp-content\/uploads\/2012\/09\/light-dia1.jpg\">blog.tredz.co.uk\/wp-content\/uploads\/2012\/09\/light-dia1.jpg<\/a>)<br \/>  \u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435, \u0442\u043e \u043b\u044e\u043a\u0441 \u2014 \u044d\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u043e\u0441\u0432\u0435\u0449\u0451\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0432 1\u043c\u00b2, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430 \u043d\u0435\u0451 \u0441\u0432\u0435\u0442\u044f\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u043e\u0439 \u0441 \u0441\u0438\u043b\u043e\u0439 \u0441\u0432\u0435\u0442\u0430 \u0432 1 \u043a\u0434 (\u043a\u0430\u043d\u0434\u0435\u043b\u0430) \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u043c \u043f\u0443\u0447\u043a\u043e\u043c \u0441\u0432\u0435\u0442\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432 1 \u0441\u0442\u0435\u0440\u0430\u0434\u0438\u0430\u043d.<br \/>  OK, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u044e\u043a\u0441\u043e\u0432 \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435? \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043e\u0441\u0432\u0435\u0449\u0451\u043d\u043d\u043e\u0441\u0442\u0438 \u0442\u0438\u043f\u0438\u0447\u0435\u043d \u0434\u043b\u044f \u0441\u0432\u0435\u0442\u043b\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a \u0438 \u0434\u043b\u044f \u0442\u0451\u043c\u043d\u043e\u0433\u043e.<br \/>  \u041a \u0441\u043b\u043e\u0432\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043d\u0435 \u043f\u044b\u0442\u0430\u0439\u0442\u0435\u0441\u044c \u0438\u0441\u043a\u0430\u0442\u044c \u0432 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a\u0430\u0445 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u201c\u043b\u044e\u043a\u0441\u201d, \u201c\u0434\u0435\u043d\u044c\u201d, \u201c\u043d\u043e\u0447\u044c\u201d, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0431\u044b\u0442\u044c \u0432 \u043a\u0443\u0440\u0441\u0435 \u043b\u0443\u0447\u0448\u0438\u0445 \u0446\u0435\u043d \u043d\u0430 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0432 \u0433\u043e\u0441\u0442\u0438\u043d\u0438\u0446\u0430\u0445 :).<\/p>\n<p>  \u0412 \u0440\u0443\u0441\u0441\u043a\u043e\u0439 Wiki \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u044b\u0441\u043a\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443 \u0441 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9B%D1%8E%D0%BA%D1%81\">\u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043e\u0441\u0432\u0435\u0449\u0451\u043d\u043d\u043e\u0441\u0442\u0438<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u0430\u043a:<br \/>  \u2022 \u0434\u043e 20 \u2014 \u0412 \u043c\u043e\u0440\u0435 \u043d\u0430 \u0433\u043b\u0443\u0431\u0438\u043d\u0435 ~50 \u043c.<br \/>  \u2022 350\u00b1150 \u2014 \u0412\u043e\u0441\u0445\u043e\u0434 \u0438\u043b\u0438 \u0437\u0430\u043a\u0430\u0442 \u043d\u0430 \u0412\u0435\u043d\u0435\u0440\u0435<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/59f\/026\/a24\/59f026a24b7d417293d18485dc2bfe84.PNG\"\/><\/p>\n<p>  \u0412 \u0441\u0438\u043b\u0443 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0434\u043b\u044f \u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0412\u0435\u043d\u0435\u0440\u044b, \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0432 50 \u043b\u044e\u043a\u0441\u043e\u0432, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u0436\u0438\u043b\u043e\u0439 \u043a\u043e\u043c\u043d\u0430\u0442\u0435.<\/p>\n<h4>\u0414\u0435\u043b\u043e \u0442\u0435\u0445\u043d\u0438\u043a\u0438<\/h4>\n<p>  \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0441 LightSensorManager, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u201c\u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u201d \u0438 \u201c\u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u201d \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u043f\u043e\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043c, \u0435\u0441\u043b\u0438 \u0441\u0442\u0430\u043b\u043e \u0442\u0435\u043c\u043d\u043e \u0438\u043b\u0438 \u0441\u0432\u0435\u0442\u043b\u043e.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">LightSensorManager<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class LightSensorManager implements SensorEventListener {       private enum Environment {DAY, NIGHT}       public interface EnvironmentChangedListener {         void onDayDetected();         void onNightDetected();     }       private static final int THRESHOLD_LUX = 50;     private static final String TAG = &quot;LightSensorManager&quot;;       private final SensorManager sensorManager;     private final Sensor lightSensor;     private EnvironmentChangedListener environmentChangedListener;     private Environment currentEnvironment;       public LightSensorManager(Context context) {         sensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);         lightSensor = sensorManager.getDefaultSensor(Sensor.TYPE_LIGHT); \/\/ \u0421\u0435\u043d\u0441\u043e\u0440 \u043e\u0441\u0432\u0435\u0449\u0451\u043d\u043d\u043e\u0441\u0442\u0438     }       public void enable() {         if (lightSensor != null){             sensorManager.registerListener(this, lightSensor, SensorManager.SENSOR_DELAY_NORMAL);         } else {             Log.w(TAG, &quot;Light sensor in not supported&quot;);         }     }       public void disable() {         sensorManager.unregisterListener(this);     }       public EnvironmentChangedListener getEnvironmentChangedListener() {         return environmentChangedListener;     }       public void setEnvironmentChangedListener(EnvironmentChangedListener environmentChangedListener) {         this.environmentChangedListener = environmentChangedListener;     }       @Override     public void onSensorChanged(SensorEvent event) {         float luxLevel = event.values[0];         Environment oldEnvironment = currentEnvironment;         currentEnvironment = luxLevel &lt; THRESHOLD_LUX ? Environment.NIGHT : Environment.DAY;         if (hasChanged(oldEnvironment, currentEnvironment)){             callListener(currentEnvironment);         }     }       @Override     public void onAccuracyChanged(Sensor sensor, int accuracy) {}         private boolean hasChanged(Environment oldEnvironment, Environment newEnvironment) {         return oldEnvironment != newEnvironment;     }       private void callListener(Environment environment) {         if (environmentChangedListener == null || environment == null){             return;         }         switch (environment) {             case DAY:                 environmentChangedListener.onDayDetected();                 break;             case NIGHT:                 environmentChangedListener.onNightDetected();                 break;         }     } }  <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0432 \u043d\u0430\u0448\u0443 Activity, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0435\u0433\u043e \u0432 onResume \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u044f \u0432 onPause.<br \/>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043d\u0435 \u0432\u044b\u0445\u043e\u0434\u044f \u0438\u0437 \u043a\u043e\u043c\u043d\u0430\u0442\u044b. \u041f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u0434\u0430\u0442\u0447\u0438\u043a \u043d\u0430 \u0434\u0435\u0432\u0430\u0439\u0441\u0435 \u0438 \u0437\u0430\u043a\u0440\u043e\u0439\u0442\u0435 \u0435\u0433\u043e \u043f\u0430\u043b\u044c\u0446\u0435\u043c.<br \/>  \u041c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043a, \u0447\u0442\u043e \u0434\u0435\u0432\u0430\u0439\u0441 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u043d\u0430\u0442\u0435 \u0441 \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u043e\u0441\u0432\u0435\u0449\u0451\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0432\u043d\u044b\u043c \u043d\u0430\u0448\u0435\u043c\u0443 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0432 50 \u043b\u044e\u043a\u0441\u043e\u0432 \u0438, \u043a\u043e\u043b\u0435\u0431\u043b\u044f\u0441\u044c, \u0431\u0443\u0434\u0435\u0442 \u0447\u0430\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0442\u044c \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0430\u0448 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043d\u0430\u0447\u043d\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u043d\u0430\u043c \u043e \u0441\u043c\u0435\u043d\u0435 \u0434\u043d\u044f \u0438 \u043d\u043e\u0447\u0438. \u041c\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u043c\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0433\u043e, \u0432\u0432\u0435\u0434\u044f 2 \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f: \u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u0438 \u043d\u0438\u0436\u043d\u0435\u0435. \u0412\u044b\u0448\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043d\u0451\u043c, \u043d\u0438\u0436\u0435 \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u2014 \u043d\u043e\u0447\u044c\u044e, \u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0440\u043e\u0433\u0430\u043c\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">LightSensorManager \u0441 \u0434\u0432\u0443\u043c\u044f \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class LightSensorManager implements SensorEventListener {       private enum Environment {DAY, NIGHT}       public interface EnvironmentChangedListener {         void onDayDetected();         void onNightDetected();     }       private static final int THRESHOLD_DAY_LUX = 50;     private static final int THRESHOLD_NIGHT_LUX = 40;     private static final String TAG = &quot;LightSensorManager&quot;;       private final SensorManager sensorManager;     private final Sensor lightSensor;     private EnvironmentChangedListener environmentChangedListener;     private Environment currentEnvironment;       public LightSensorManager(Context context) {         sensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);         lightSensor = sensorManager.getDefaultSensor(Sensor.TYPE_LIGHT); \/\/ \u0421\u0435\u043d\u0441\u043e\u0440 \u043e\u0441\u0432\u0435\u0449\u0451\u043d\u043d\u043e\u0441\u0442\u0438     }       public void enable() {         if (lightSensor != null){             sensorManager.registerListener(this, lightSensor, SensorManager.SENSOR_DELAY_NORMAL);         } else {             Log.w(TAG, &quot;Light sensor in not supported&quot;);         }     }       public void disable() {         sensorManager.unregisterListener(this);     }       public EnvironmentChangedListener getEnvironmentChangedListener() {         return environmentChangedListener;     }       public void setEnvironmentChangedListener(EnvironmentChangedListener environmentChangedListener) {         this.environmentChangedListener = environmentChangedListener;     }       @Override     public void onSensorChanged(SensorEvent event) {         float luxLevel = event.values[0];         Environment oldEnvironment = currentEnvironment;         if (luxLevel &lt; THRESHOLD_NIGHT_LUX){             currentEnvironment = Environment.NIGHT;         } else if (luxLevel &gt; THRESHOLD_DAY_LUX){             currentEnvironment = Environment.DAY;         }         if (hasChanged(oldEnvironment, currentEnvironment)){             callListener(currentEnvironment);         }     }       @Override     public void onAccuracyChanged(Sensor sensor, int accuracy) {}         private boolean hasChanged(Environment oldEnvironment, Environment newEnvironment) {         return oldEnvironment != newEnvironment;     }       private void callListener(Environment environment) {         if (environmentChangedListener == null || environment == null){             return;         }         switch (environment) {             case DAY:                 environmentChangedListener.onDayDetected();                 break;             case NIGHT:                 environmentChangedListener.onNightDetected();                 break;         }     } }  <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<p>  \u0418 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043d\u044e\u0430\u043d\u0441: \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u043e\u0436\u043d\u043e\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u043a\u0440\u0430\u0442\u043a\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u0441\u0438\u043b\u044c\u043d\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0443\u0440\u043e\u0432\u043d\u044f \u043e\u0441\u0432\u0435\u0449\u0451\u043d\u043d\u043e\u0441\u0442\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u201c\u043c\u043e\u0440\u0433\u043d\u0451\u0442 \u0441\u0432\u0435\u0442\u201d \u0438\u0437-\u0437\u0430 \u043f\u0435\u0440\u0435\u043f\u0430\u0434\u0430 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0439\u0434\u0435\u0442 \u043d\u043e\u0447\u044c\u044e \u043f\u043e\u0434 \u0444\u043e\u043d\u0430\u0440\u043d\u044b\u043c \u0441\u0442\u043e\u043b\u0431\u043e\u043c. <\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/dc6\/e85\/338\/dc6e853382f9422ba53ec4cd9dd4db20.jpg\"\/><\/p>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c \u0444\u0438\u043b\u044c\u0442\u0440 \u043d\u0438\u0437\u043a\u0438\u0445 \u0447\u0430\u0441\u0442\u043e\u0442 (\u043e\u043d \u0436\u0435 low pass filter). \u041e\u043d \u0441\u0433\u043b\u0430\u0434\u0438\u0442 \u0432\u0441\u0435 \u0440\u0435\u0437\u043a\u0438\u0435 \u0438 \u043a\u0440\u0430\u0442\u043a\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u0441\u0435\u043d\u0441\u043e\u0440\u0430.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">LightSensorManager \u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c \u043d\u0438\u0437\u043a\u0438\u0445 \u0447\u0430\u0441\u0442\u043e\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class LightSensorManager implements SensorEventListener {       private enum Environment {DAY, NIGHT}       public interface EnvironmentChangedListener {         void onDayDetected();         void onNightDetected();     }       private static final float SMOOTHING = 10;     private static final int THRESHOLD_DAY_LUX = 50;     private static final int THRESHOLD_NIGHT_LUX = 40;     private static final String TAG = &quot;LightSensorManager&quot;;       private final SensorManager sensorManager;     private final Sensor lightSensor;     private EnvironmentChangedListener environmentChangedListener;     private Environment currentEnvironment;     private final LowPassFilter lowPassFilter;       public LightSensorManager(Context context) {         sensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);         lightSensor = sensorManager.getDefaultSensor(Sensor.TYPE_LIGHT);         lowPassFilter = new LowPassFilter(SMOOTHING);     }       public void enable() {         if (lightSensor != null){             sensorManager.registerListener(this, lightSensor, SensorManager.SENSOR_DELAY_NORMAL);         } else {             Log.w(TAG, &quot;Light sensor in not supported&quot;);         }     }       public void disable() {         sensorManager.unregisterListener(this);     }       public EnvironmentChangedListener getEnvironmentChangedListener() {         return environmentChangedListener;     }       public void setEnvironmentChangedListener(EnvironmentChangedListener environmentChangedListener) {         this.environmentChangedListener = environmentChangedListener;     }       @Override     public void onSensorChanged(SensorEvent event) {         float luxLevel = event.values[0];         luxLevel = lowPassFilter.submit(luxLevel);         Environment oldEnvironment = currentEnvironment;         if (luxLevel &lt; THRESHOLD_NIGHT_LUX){             currentEnvironment = Environment.NIGHT;         } else if (luxLevel &gt; THRESHOLD_DAY_LUX){             currentEnvironment = Environment.DAY;         }         if (hasChanged(oldEnvironment, currentEnvironment)){             callListener(currentEnvironment);         }     }       @Override     public void onAccuracyChanged(Sensor sensor, int accuracy) {}         private boolean hasChanged(Environment oldEnvironment, Environment newEnvironment) {         return oldEnvironment != newEnvironment;     }       private void callListener(Environment environment) {         if (environmentChangedListener == null || environment == null){             return;         }         switch (environment) {             case DAY:                 environmentChangedListener.onDayDetected();                 break;             case NIGHT:                 environmentChangedListener.onNightDetected();                 break;         }     } }     public class LowPassFilter {       private float filteredValue;     private final float smoothing;     private boolean firstTime = true;       public LowPassFilter(float smoothing) {         this.smoothing = smoothing;     }       public float submit(float newValue){         if (firstTime){             filteredValue = newValue;             firstTime = false;             return filteredValue;         }         filteredValue += (newValue - filteredValue) \/ smoothing;         return filteredValue;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438 \u0433\u043e\u0432\u043e\u0440\u044f, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Android \u043b\u044e\u0431\u0435\u0437\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432 \u043a\u043b\u0430\u0441\u0441<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9B%D1%8E%D0%BA%D1%81\"> SensorManager<\/a> \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0440\u0430\u0437\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u043e\u0441\u0432\u0435\u0449\u0451\u043d\u043d\u043e\u0441\u0442\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"http:\/\/developer.android.com\/reference\/android\/hardware\/SensorManager.html#LIGHT_CLOUDY\">SensorManager.LIGHT_CLOUDY<\/a> \u0438\u043b\u0438 <a href=\"http:\/\/developer.android.com\/reference\/android\/hardware\/SensorManager.html#LIGHT_FULLMOON\">SensorManager.LIGHT_FULLMOON<\/a>.<\/p>\n<p>  \u041d\u0443 \u0432\u043e\u0442 \u0438 \u0433\u043e\u0442\u043e\u0432\u043e, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f. \u0417\u0434\u043e\u0440\u043e\u0432\u043e, \u0447\u0442\u043e \u043f\u043e\u0434 \u0431\u0435\u0437\u0434\u0443\u0448\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0432\u044f\u0437\u044c \u0441 \u0444\u0438\u0437\u0438\u043a\u043e\u0439. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0435\u043d\u0441\u043e\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0441\u043d\u0430\u0449\u0435\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u0434\u043e\u0431\u043d\u0435\u0439 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0432 \u043a\u0430\u043a\u043e\u0439- \u0442\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u044f\u0441\u044c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u043d\u0430\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0434\u043d\u044f \u0438\u043b\u0438 \u043d\u043e\u0447\u0438, \u0437\u0430\u0435\u0437\u0434\u0430 \u0432 \u0442\u043e\u043d\u043d\u0435\u043b\u044c \u0438\u043b\u0438 \u0432\u044b\u0445\u043e\u0434\u0430 \u043d\u0430 \u043f\u043b\u044f\u0436.<br \/>  \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u043b\u0435\u0442\u043e \u043d\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u2013 \u0432\u0441\u0435 \u0431\u0435\u0433\u043e\u043c \u043d\u0430 \u043f\u043b\u044f\u0436 \u0447\u0438\u0442\u0430\u0442\u044c.<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/cc1\/7c7\/6c9\/cc17c76c99f446c7b5a96db233e3d790.PNG\"\/>     \t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/255961\/\"> http:\/\/habrahabr.ru\/post\/255961\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<br \/>\n<h4>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440.<\/h4>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0437\u0434\u043e\u0440\u043e\u0432\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0442\u0435\u043c\u043d\u043e\u0442\u0435. \u0412 \u0434\u0435\u0442\u0441\u0442\u0432\u0435 \u043d\u0430\u043c \u0432\u0441\u0435\u043c \u043c\u0430\u043c\u044b \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u043b\u0438 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u044b! \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0431\u0443\u043c\u0430\u0436\u043d\u044b\u0445 \u043a\u043d\u0438\u0433, \u043d\u0430 \u043d\u0438\u0445 \u043d\u0435 \u043d\u0430\u0434\u043e \u0441\u0432\u0435\u0442\u0438\u0442\u044c \u0444\u043e\u043d\u0430\u0440\u0438\u043a\u043e\u043c, \u043e\u043d\u0438 \u0441\u0430\u043c\u0438 \u0437\u0430 \u0432\u0430\u0441 \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u044e\u0442. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u044b \u0438\u0445 \u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0430\u0435\u043c. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u0431\u043e \u0432\u0441\u0435\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/fef\/a0b\/f7d\/fefa0bf7d8954cf2b19094262875e0cb.PNG\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-255437","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/255437","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=255437"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/255437\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=255437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=255437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=255437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}