{"id":459377,"date":"2025-05-12T21:01:25","date_gmt":"2025-05-12T21:01:25","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=459377"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=459377","title":{"rendered":"<span>\u041a\u043e\u0433\u0434\u0430 JavaScript \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e: \u041f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0434\u043b\u044f React Native<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f React Native-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 <em>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 JavaScript. \u0412\u044b \u043d\u0430\u0443\u0447\u0438\u0442\u0435\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0430 Kotlin, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 NFC, Bluetooth, \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c\u0438 API \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u00ab\u0437\u0430\u043a\u0440\u044b\u0442\u044b\u043c\u0438\u00bb \u0434\u043b\u044f RN \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438. \u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 + \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430.<\/em><\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e, \u043d\u0430 \u0441\u0432\u044f\u0437\u0438 <a href=\"https:\/\/t.me\/notReadySir\" rel=\"noopener noreferrer nofollow\">\u00ab\u0412\u0430\u0448 \u043a\u043e\u0434 \u0435\u0449\u0435 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432, \u0441\u044d\u0440\u00bb<\/a> \u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u044f\u0445 \u0432 React Native \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445. \u041f\u043e\u0447\u0435\u043c\u0443 \u044f \u043b\u044e\u0431\u043b\u044e javascript? \u041f\u0435\u0440\u0435\u0444\u0440\u0430\u0437\u0438\u0440\u0443\u044e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0443\u044e \u0444\u0440\u0430\u0437\u0443:<\/p>\n<blockquote>\n<p>\u00ab\u041e\u0434\u0438\u043d \u043a\u043e\u0434, \u0447\u0442\u043e\u0431 \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435\u043c\u0438, \u043e\u043d \u0433\u043b\u0430\u0432\u043d\u0435\u0435 \u0432\u0441\u0435\u0445, \u043e\u043d \u0441\u043e\u0431\u0435\u0440\u0451\u0442 \u0432\u0441\u0435\u0445 \u0432\u043c\u0435\u0441\u0442\u0435 \u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442 \u0432\u043e \u0422\u044c\u043c\u0435&#187;.\u00bb<\/p>\n<\/blockquote>\n<p>\u0414\u0430, \u043d\u0430 js (ts) \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0438 \u0432\u0441\u044f \u0438\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u043e, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0434 IOS \u0438 Android. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043a\u0430\u043a \u0438 \u0443 \u043b\u044e\u0431\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438, \u043d\u043e \u0442\u0443\u0442 \u043d\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c.<\/p>\n<p>\u041c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0434\u043b\u044f <strong>React Native<\/strong> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0430\u043c React Native.<\/p>\n<p>\u0423\u043a\u0440\u0430\u0434\u0443 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441 \u0432\u0438\u043a\u0438.<\/p>\n<blockquote>\n<p>React Native \u2014 \u044d\u0442\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 Facebook. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f iOS \u0438 Android, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f JavaScript \u0438 React, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0434\u043b\u044f \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<\/blockquote>\n<p>\u0427\u0442\u043e \u0436, \u0442\u043e\u0447\u043d\u0435\u0435 \u0438 \u043d\u0435 \u0441\u043a\u0430\u0436\u0435\u0448\u044c.<\/p>\n<p>\u0417\u0432\u0443\u0447\u0438\u0442 \u0437\u0434\u043e\u0440\u043e\u0432\u043e? \u0414\u0430. \u041d\u043e \u043f\u043e\u0440\u043e\u0439, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c:<\/p>\n<pre><code> 1. \u0421\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 NFC-\u043c\u0435\u0442\u043e\u043a  2. \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 Bluetooth Low Energy  3. \u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u0442\u0447\u0438\u043a\u0430\u043c (\u0433\u0438\u0440\u043e\u0441\u043a\u043e\u043f, \u0431\u0430\u0440\u043e\u043c\u0435\u0442\u0440)  4. \u0424\u043e\u043d\u043e\u0432\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b <\/code><\/pre>\n<p>\u0414\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430\u043c\u0438 <strong>RN<\/strong> (react native) \u043d\u0435\u043b\u044c\u0437\u044f. \u0412\u043e\u0442 \u0442\u0443\u0442 \u043d\u0430 \u0441\u0446\u0435\u043d\u0443 \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438. \u0418 \u0447\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0430\u043a\u043e\u0435 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438?<\/p>\n<p><strong>\u041d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u0434<\/strong> \u2014 \u044d\u0442\u043e \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0438\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e\u0434 iOS \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u044f\u0437\u044b\u043a Swift \u0438\u043b\u0438 Objective-C, \u0430 \u0434\u043b\u044f Android \u2014 Java \u0438\u043b\u0438 Kotlin. \u041d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435, \u0447\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u043e\u043b\u043d\u043e\u043c\u0443 \u043d\u0430\u0431\u043e\u0440\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p><strong>\u041d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438<\/strong> \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 React Native \u2014 \u044d\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u0438, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Java \u0434\u043b\u044f Android \u0438\u043b\u0438 Swift\/Objective-C \u0434\u043b\u044f iOS), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b React Native.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0447\u0442\u043e \u0438 \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u043e, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043c\u043e\u0434\u0443\u043b\u044f. \u041c\u043e\u0434\u0443\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430 kotlin, \u0442.\u00a0\u043a. \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 0.74 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435.<\/p>\n<p>\u041d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043d\u0430\u0447\u043d\u0435\u043c, \u043e\u0433\u043e\u0432\u043e\u0440\u044e\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0433\u0434\u0435 \u043c\u044b \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c  \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0438 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c \u0432\u043d\u043e\u0432\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435:<\/p>\n<pre><code> my-react-native-app\/ \u251c\u2500\u2500 android\/ \u2502   \u251c\u2500\u2500 app\/ \u2502   \u2502   \u251c\u2500\u2500 src\/ \u2502   \u2502   \u2502   \u251c\u2500\u2500 main\/ \u2502   \u2502   \u2502   \u2502   \u251c\u2500\u2500 java\/ \u2502   \u2502   \u2502   \u2502   \u2502   \u2514\u2500\u2500 com\/ \u2502   \u2502   \u2502   \u2502   \u2502       \u2514\u2500\u2500 myreactnativeapp\/ \u2502   \u2502   \u2502   \u2502   \u2502           \u251c\u2500\u2500 MainActivity.kt \u2502   \u2502   \u2502   \u2502   \u2502           \u251c\u2500\u2500 MainApplication.kt \u2502   \u2502   \u2502   \u2502   \u2502           \u2514\u2500\u2500 &lt;your_native_module&gt;.kt \u2502   \u2502   \u2502   \u2502   \u251c\u2500\u2500 res\/ \u2502   \u2502   \u2502   \u2502   \u2514\u2500\u2500 AndroidManifest.xml \u2502   \u2502   \u2514\u2500\u2500 build.gradle \u2502   \u251c\u2500\u2500 build.gradle \u2502   \u2514\u2500\u2500 settings.gradle \u2514\u2500\u2500 package.json <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 1 \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/em><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f<\/p>\n<pre><code class=\"kotlin\">package com.myreactnativeapp  import android.app.NotificationManager import android.content.Context import android.content.Intent import android.os.Build import android.provider.Settings import androidx.core.app.NotificationManagerCompat import com.facebook.react.bridge.*  class NotificationStatusModule(private val reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {     override fun getName(): String = \"NotificationStatus\"      @ReactMethod     fun checkFullNotificationStatus(promise: Promise) {         try {             val result = Arguments.createMap()             val appEnabled = NotificationManagerCompat.from(reactContext).areNotificationsEnabled()             result.putBoolean(\"appEnabled\", appEnabled)              val notificationManager = reactContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager             val isDndEnabled = if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.M) {                 val filter = notificationManager.currentInterruptionFilter                 filter == NotificationManager.INTERRUPTION_FILTER_NONE ||                  filter == NotificationManager.INTERRUPTION_FILTER_ALARMS             } else false                          result.putBoolean(\"doNotDisturb\", isDndEnabled)             promise.resolve(result)         } catch (e: Exception) {             promise.reject(\"ERROR\", \"Failed to check notification status\", e)         }     }      @ReactMethod     fun openNotificationSettings() {         val intent = Intent().apply {             action = Settings.ACTION_APP_NOTIFICATION_SETTINGS             putExtra(Settings.EXTRA_APP_PACKAGE, reactContext.packageName)             flags = Intent.FLAG_ACTIVITY_NEW_TASK         }         reactContext.startActivity(intent)     } } <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 2 \u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043d\u0430 Android<\/em><\/p>\n<p>\u041d\u0430 \u0447\u0442\u043e \u0442\u0443\u0442 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435? \u0414\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f, \u0441\u043f\u0435\u0440\u0432\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 <strong>ReactContextBaseJavaModule.<\/strong> \u042d\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 RN.<br \/> \u0414\u0430\u043d\u043d\u044b\u0439  \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 <strong>ReactApplicationContext<\/strong> &#8212; \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 React Native \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u0443\u044e\u0449\u0438\u043c \u0437\u0432\u0435\u043d\u043e\u043c \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c (Java \u0438\u043b\u0438 Kotlin) \u0438 JavaScript-\u043a\u043e\u0434\u043e\u043c. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b JavaScript \u0438\u0437 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.<\/p>\n<h4>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043b\u0430\u0441\u0441\u0430 NotificationStatusModule<\/h4>\n<ul>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>getName()<\/strong> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043c\u044f \u043c\u043e\u0434\u0443\u043b\u044f (&#171;NotificationStatus&#187;), \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 JS<\/p>\n<\/li>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 &#8212; <strong>checkFullNotificationStatus:<\/strong><\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"kotlin\">val result = Arguments.createMap() <\/code><\/pre>\n<p>\u0420\u0438\u0441. 3 \u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u0442 WritableMap &#8212; \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f React Native \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 JS<\/p>\n<pre><code class=\"kotlin\">val appEnabled = NotificationManagerCompat.from(reactContext).areNotificationsEnabled() result.putBoolean(\"appEnabled\", appEnabled) <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 4 \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 NotificationManagerCompat<\/em><\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 areNotificationsEnabled() \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043b\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/> \u041e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 true, \u0435\u0441\u043b\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0438 false, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b \u0438\u0445 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445<\/p>\n<pre><code class=\"kotlin\">val notificationManager = reactContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager val isDndEnabled = if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.M) {     val filter = notificationManager.currentInterruptionFilter     filter == NotificationManager.INTERRUPTION_FILTER_NONE ||      filter == NotificationManager.INTERRUPTION_FILTER_ALARMS } else false  <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 5 \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0440\u0435\u0436\u0438\u043c\u0430 &#171;\u041d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c&#187;<\/em><\/p>\n<p>\u041a\u043e\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u044e Android, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 API 23 (Android 6.0, Marshmallow) \u0438 \u0432\u044b\u0448\u0435.<br \/> \u0417\u0430\u0442\u0435\u043c \u043e\u043d \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 currentInterruptionFilter, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f:<\/p>\n<blockquote>\n<p>INTERRUPTION_FILTER_NONE \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b (\u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435).<\/p>\n<\/blockquote>\n<blockquote>\n<p>INTERRUPTION_FILTER_ALARMS \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438.<\/p>\n<\/blockquote>\n<p>\u0414\u043b\u044f \u0441\u0442\u0430\u0440\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 Android (\u0434\u043e API 23) \u043a\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 false, \u0442\u0430\u043a \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f currentInterruptionFilter \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430.<\/p>\n<pre><code class=\"kotlin\">result.putBoolean(\"doNotDisturb\", isDndEnabled) promise.resolve(result) <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 6 \u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f DND \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/em><\/p>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u0434\u0432\u0443\u043c\u044f \u043f\u043e\u043b\u044f\u043c\u0438:<\/p>\n<blockquote>\n<p>{<br \/> appEnabled: boolean, \/\/ \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043b\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<br \/> doNotDisturb: boolean \/\/ \u0410\u043a\u0442\u0438\u0432\u0435\u043d \u043b\u0438 \u0440\u0435\u0436\u0438\u043c &#171;\u041d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c&#187;<br \/> }<\/p>\n<\/blockquote>\n<ul>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434 <strong>openNotificationSettings:<\/strong><\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"kotlin\">val intent = Intent().apply {     action = Settings.ACTION_APP_NOTIFICATION_SETTINGS     putExtra(Settings.EXTRA_APP_PACKAGE, reactContext.packageName)     flags = Intent.FLAG_ACTIVITY_NEW_TASK } reactContext.startActivity(intent) <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 7 \u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/em><\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<br \/> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 Intent Android \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438:<\/p>\n<blockquote>\n<p>ACTION_APP_NOTIFICATION_SETTINGS &#8212; \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439<\/p>\n<\/blockquote>\n<blockquote>\n<p>EXTRA_APP_PACKAGE &#8212; \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c<\/p>\n<\/blockquote>\n<blockquote>\n<p>FLAG_ACTIVITY_NEW_TASK &#8212; \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443<\/p>\n<\/blockquote>\n<h4>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u00ab\u043f\u0430\u043a\u0435\u0442\u00bb<\/h4>\n<p>\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442? \u041c\u043e\u0434\u0443\u043b\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443 (NotificationStatusModule), \u0430 \u043f\u0430\u043a\u0435\u0442 &#8212; \u044d\u0442\u043e \u0444\u0430\u0431\u0440\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u043d\u0430\u0435\u0442 \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c.<\/p>\n<pre><code class=\"kotlin\">package com.myreactnativeapp  import com.facebook.react.ReactPackage import com.facebook.react.bridge.NativeModule import com.facebook.react.bridge.ReactApplicationContext import com.facebook.react.uimanager.ViewManager  class NotificationStatusPackage : ReactPackage { override fun createNativeModules(reactContext: ReactApplicationContext): List&lt;NativeModule&gt; { return listOf(NotificationStatusModule(reactContext)) }  override fun createViewManagers(reactContext: ReactApplicationContext): List&lt;ViewManager&lt;*, *&gt;&gt; { return emptyList() } } <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 8 \u041a\u043e\u0434 \u043f\u0430\u043a\u0435\u0442\u0430<\/em><\/p>\n<p>\u041f\u0430\u043a\u0435\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442:<\/p>\n<pre><code> 1. \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 \u043e\u0434\u0438\u043d \u043f\u0430\u043a\u0435\u0442:  2. \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438  3. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 <\/code><\/pre>\n<p>\u0427\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0431\u0435\u0437 \u043f\u0430\u043a\u0435\u0442\u0430? React Native \u043d\u0435 \u0441\u043c\u043e\u0433 \u0431\u044b:<\/p>\n<pre><code> 1. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0432\u0430\u0448 \u043c\u043e\u0434\u0443\u043b\u044c  2. \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c  3. \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e JavaScript-\u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f <\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u043f\u0430\u043a\u0435\u0442\u0430? \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0435\u0440\u0435\u0437 ReactInstanceManager, \u043d\u043e \u044d\u0442\u043e:<\/p>\n<pre><code> 1. \u0421\u043b\u043e\u0436\u043d\u0435\u0435 \u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435  2. \u041d\u0430\u0440\u0443\u0448\u0430\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 flow React Native  3. \u041c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u043c \u0446\u0438\u043a\u043b\u043e\u043c <\/code><\/pre>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<pre><code>1. React Native \u0438\u0449\u0435\u0442 \u0432\u0441\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0432 getPackages() 2. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 createNativeModules() 3. \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 NativeModuleRegistry 4. \u0414\u0435\u043b\u0430\u0435\u0442 \u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0432 JavaScript \u0447\u0435\u0440\u0435\u0437 NativeModules <\/code><\/pre>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0430\u043a\u0435\u0442 &#8212; \u044d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 &#171;\u043c\u043e\u0441\u0442&#187; \u043c\u0435\u0436\u0434\u0443 \u0432\u0430\u0448\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u0438 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 React Native.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0430\u043a\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043d\u0430\u0448\u0435\u043c <strong>MainApplication.kt<\/strong><\/p>\n<pre><code class=\"kotlin\">package com.myreactnativeapp  import android.app.Application import com.facebook.react.PackageList import com.facebook.react.ReactApplication import com.facebook.react.ReactHost import com.facebook.react.ReactNativeHost import com.facebook.react.ReactPackage import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost import com.facebook.react.defaults.DefaultReactNativeHost import com.facebook.soloader.SoLoader  class MainApplication : Application(), ReactApplication {     override val reactNativeHost: ReactNativeHost =         object : DefaultReactNativeHost(this) {             override fun getPackages(): List&lt;ReactPackage&gt; =                 PackageList(this).packages.apply {                     add(NotificationStatusPackage())                 }              override fun getJSMainModuleName(): String = \"index\"             override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG             override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED             override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED         }      override val reactHost: ReactHost         get() = getDefaultReactHost(applicationContext, reactNativeHost)      override fun onCreate() {         super.onCreate()         SoLoader.init(this, false)         if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {             load()         }     } } <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 9 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f React Native \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043d\u043e\u0432\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432<\/em><\/p>\n<p>\u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0442\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432, MainApplication \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0432 \u043d\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043c\u0435\u0442\u043e\u0434 getPackages \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0443:<\/p>\n<p><code>add(NotificationStatusPackage())<\/code><\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0432 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041d\u043e, \u0442.\u00a0\u043a. \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f\u043c, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432 AndroidManifest.xml \u0434\u043e\u0431\u0430\u0432\u0438\u0432 2 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code>&lt;uses-permission android:name=\"android.permission.ACCESS_NOTIFICATION_POLICY\" \/&gt; &lt;uses-permission android:name=\"android.permission.POST_NOTIFICATIONS\" \/&gt; <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 10 \u0417\u0430\u043f\u0440\u043e\u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f\u043c\u0438<\/em><\/p>\n<p>\u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 build.gradle \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0430<\/p>\n<p><code>implementation \"org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion\"<\/code><\/p>\n<p>\u044d\u0442\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 Kotlin \u0432 \u0441\u0432\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<p>\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e, \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0432\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 react native \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u0414\u0430, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u043d\u043e \u043a\u0430\u043a \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c? \u0421 \u044d\u0442\u0438\u043c \u043a\u0443\u0434\u0430 \u043f\u0440\u043e\u0449\u0435, \u0432\u0441\u0435 \u0447\u0442\u043e \u0432\u0430\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442.<\/p>\n<h4>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043b\u0430\u0441\u0441 AndroidNotificationChecker<\/h4>\n<pre><code class=\"javascript\">import { NativeModules, Platform, Linking } from 'react-native';  const NotificationStatus = NativeModules.NotificationStatus;  class AndroidNotificationChecker {   static async checkFullStatus() {     if (Platform.OS !== 'android') {       return {         appEnabled: false,         systemEnabled: false,         doNotDisturb: false,         error: 'This module works only on Android'       };     }      try {       const status = await NotificationStatus.checkFullNotificationStatus();       return status;     } catch (error) {       console.error('Error checking notification status:', error);       return {         appEnabled: false,         systemEnabled: false,         doNotDisturb: false,         error: error.message       };     }   }    static openNotificationSettings() {     NotificationStatus.openNotificationSettings();   }    static openSystemNotificationSettings() {     NotificationStatus.openSystemNotificationSettings();   } }  export default AndroidNotificationChecker; <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 11 \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 AndroidNotificationChecker<\/em><\/p>\n<p>\u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043d\u0430\u0448 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u043f\u0435\u0440\u0435\u0434 React Native-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 \u043f\u043e\u0438\u0441\u0442\u0438\u043d\u0435 \u0431\u0435\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u0422\u0435\u0445\u043d\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f\u043c\u0438, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0430 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u043e\u0439 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 &#171;\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438&#187; \u0432 React Native. \u042d\u0442\u043e \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0430\u0448 \u0433\u0438\u0431\u0440\u0438\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441 \u0443\u043c\u043e\u043c!<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f, \u0442\u043e \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c, \u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043b\u0430\u0439\u043a\u0438 \u0438 \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0440\u0435\u043f\u043e\u0441\u0442\u044b. <strong>\u042d\u0442\u043e \u043b\u0443\u0447\u0448\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0430.<\/strong> \u0421 \u0432\u0430\u043c\u0438 \u0431\u044b\u043b \u0414\u0443\u0431\u043e\u0432\u0438\u0446\u043a\u0438\u0439 \u042e\u0440\u0438\u0439, \u0430\u0432\u0442\u043e\u0440 \u043a\u0430\u043d\u0430\u043b\u0430 <a href=\"https:\/\/t.me\/notReadySir\" rel=\"noopener noreferrer nofollow\">\u00ab\u0412\u0430\u0448 \u043a\u043e\u0434 \u0435\u0449\u0435 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432, \u0441\u044d\u0440\u00bb<\/a>.<br \/> \u0410 \u043d\u0430\u0448 \u043a\u043e\u0434 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432. \u0414\u043e \u0441\u0432\u044f\u0437\u0438!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/908690\/\"> https:\/\/habr.com\/ru\/articles\/908690\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f React Native-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 <em>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 JavaScript. \u0412\u044b \u043d\u0430\u0443\u0447\u0438\u0442\u0435\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0430 Kotlin, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 NFC, Bluetooth, \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c\u0438 API \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u00ab\u0437\u0430\u043a\u0440\u044b\u0442\u044b\u043c\u0438\u00bb \u0434\u043b\u044f RN \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438. \u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 + \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430.<\/em><\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e, \u043d\u0430 \u0441\u0432\u044f\u0437\u0438 <a href=\"https:\/\/t.me\/notReadySir\" rel=\"noopener noreferrer nofollow\">\u00ab\u0412\u0430\u0448 \u043a\u043e\u0434 \u0435\u0449\u0435 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432, \u0441\u044d\u0440\u00bb<\/a> \u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u044f\u0445 \u0432 React Native \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445. \u041f\u043e\u0447\u0435\u043c\u0443 \u044f \u043b\u044e\u0431\u043b\u044e javascript? \u041f\u0435\u0440\u0435\u0444\u0440\u0430\u0437\u0438\u0440\u0443\u044e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0443\u044e \u0444\u0440\u0430\u0437\u0443:<\/p>\n<blockquote>\n<p>\u00ab\u041e\u0434\u0438\u043d \u043a\u043e\u0434, \u0447\u0442\u043e\u0431 \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435\u043c\u0438, \u043e\u043d \u0433\u043b\u0430\u0432\u043d\u0435\u0435 \u0432\u0441\u0435\u0445, \u043e\u043d \u0441\u043e\u0431\u0435\u0440\u0451\u0442 \u0432\u0441\u0435\u0445 \u0432\u043c\u0435\u0441\u0442\u0435 \u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442 \u0432\u043e \u0422\u044c\u043c\u0435&#187;.\u00bb<\/p>\n<\/blockquote>\n<p>\u0414\u0430, \u043d\u0430 js (ts) \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0438 \u0432\u0441\u044f \u0438\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u043e, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0434 IOS \u0438 Android. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043a\u0430\u043a \u0438 \u0443 \u043b\u044e\u0431\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438, \u043d\u043e \u0442\u0443\u0442 \u043d\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c.<\/p>\n<p>\u041c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0434\u043b\u044f <strong>React Native<\/strong> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0430\u043c React Native.<\/p>\n<p>\u0423\u043a\u0440\u0430\u0434\u0443 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441 \u0432\u0438\u043a\u0438.<\/p>\n<blockquote>\n<p>React Native \u2014 \u044d\u0442\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 Facebook. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f iOS \u0438 Android, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f JavaScript \u0438 React, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0434\u043b\u044f \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<\/blockquote>\n<p>\u0427\u0442\u043e \u0436, \u0442\u043e\u0447\u043d\u0435\u0435 \u0438 \u043d\u0435 \u0441\u043a\u0430\u0436\u0435\u0448\u044c.<\/p>\n<p>\u0417\u0432\u0443\u0447\u0438\u0442 \u0437\u0434\u043e\u0440\u043e\u0432\u043e? \u0414\u0430. \u041d\u043e \u043f\u043e\u0440\u043e\u0439, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c:<\/p>\n<pre><code> 1. \u0421\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 NFC-\u043c\u0435\u0442\u043e\u043a  2. \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 Bluetooth Low Energy  3. \u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u0442\u0447\u0438\u043a\u0430\u043c (\u0433\u0438\u0440\u043e\u0441\u043a\u043e\u043f, \u0431\u0430\u0440\u043e\u043c\u0435\u0442\u0440)  4. \u0424\u043e\u043d\u043e\u0432\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b <\/code><\/pre>\n<p>\u0414\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430\u043c\u0438 <strong>RN<\/strong> (react native) \u043d\u0435\u043b\u044c\u0437\u044f. \u0412\u043e\u0442 \u0442\u0443\u0442 \u043d\u0430 \u0441\u0446\u0435\u043d\u0443 \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438. \u0418 \u0447\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0430\u043a\u043e\u0435 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438?<\/p>\n<p><strong>\u041d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u0434<\/strong> \u2014 \u044d\u0442\u043e \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0438\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e\u0434 iOS \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u044f\u0437\u044b\u043a Swift \u0438\u043b\u0438 Objective-C, \u0430 \u0434\u043b\u044f Android \u2014 Java \u0438\u043b\u0438 Kotlin. \u041d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435, \u0447\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u043e\u043b\u043d\u043e\u043c\u0443 \u043d\u0430\u0431\u043e\u0440\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p><strong>\u041d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438<\/strong> \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 React Native \u2014 \u044d\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u0438, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Java \u0434\u043b\u044f Android \u0438\u043b\u0438 Swift\/Objective-C \u0434\u043b\u044f iOS), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b React Native.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0447\u0442\u043e \u0438 \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u043e, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043c\u043e\u0434\u0443\u043b\u044f. \u041c\u043e\u0434\u0443\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430 kotlin, \u0442.\u00a0\u043a. \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 0.74 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435.<\/p>\n<p>\u041d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043d\u0430\u0447\u043d\u0435\u043c, \u043e\u0433\u043e\u0432\u043e\u0440\u044e\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0433\u0434\u0435 \u043c\u044b \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c  \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0438 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c \u0432\u043d\u043e\u0432\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435:<\/p>\n<pre><code> my-react-native-app\/ \u251c\u2500\u2500 android\/ \u2502   \u251c\u2500\u2500 app\/ \u2502   \u2502   \u251c\u2500\u2500 src\/ \u2502   \u2502   \u2502   \u251c\u2500\u2500 main\/ \u2502   \u2502   \u2502   \u2502   \u251c\u2500\u2500 java\/ \u2502   \u2502   \u2502   \u2502   \u2502   \u2514\u2500\u2500 com\/ \u2502   \u2502   \u2502   \u2502   \u2502       \u2514\u2500\u2500 myreactnativeapp\/ \u2502   \u2502   \u2502   \u2502   \u2502           \u251c\u2500\u2500 MainActivity.kt \u2502   \u2502   \u2502   \u2502   \u2502           \u251c\u2500\u2500 MainApplication.kt \u2502   \u2502   \u2502   \u2502   \u2502           \u2514\u2500\u2500 &lt;your_native_module&gt;.kt \u2502   \u2502   \u2502   \u2502   \u251c\u2500\u2500 res\/ \u2502   \u2502   \u2502   \u2502   \u2514\u2500\u2500 AndroidManifest.xml \u2502   \u2502   \u2514\u2500\u2500 build.gradle \u2502   \u251c\u2500\u2500 build.gradle \u2502   \u2514\u2500\u2500 settings.gradle \u2514\u2500\u2500 package.json <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 1 \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/em><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f<\/p>\n<pre><code class=\"kotlin\">package com.myreactnativeapp  import android.app.NotificationManager import android.content.Context import android.content.Intent import android.os.Build import android.provider.Settings import androidx.core.app.NotificationManagerCompat import com.facebook.react.bridge.*  class NotificationStatusModule(private val reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {     override fun getName(): String = \"NotificationStatus\"      @ReactMethod     fun checkFullNotificationStatus(promise: Promise) {         try {             val result = Arguments.createMap()             val appEnabled = NotificationManagerCompat.from(reactContext).areNotificationsEnabled()             result.putBoolean(\"appEnabled\", appEnabled)              val notificationManager = reactContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager             val isDndEnabled = if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.M) {                 val filter = notificationManager.currentInterruptionFilter                 filter == NotificationManager.INTERRUPTION_FILTER_NONE ||                  filter == NotificationManager.INTERRUPTION_FILTER_ALARMS             } else false                          result.putBoolean(\"doNotDisturb\", isDndEnabled)             promise.resolve(result)         } catch (e: Exception) {             promise.reject(\"ERROR\", \"Failed to check notification status\", e)         }     }      @ReactMethod     fun openNotificationSettings() {         val intent = Intent().apply {             action = Settings.ACTION_APP_NOTIFICATION_SETTINGS             putExtra(Settings.EXTRA_APP_PACKAGE, reactContext.packageName)             flags = Intent.FLAG_ACTIVITY_NEW_TASK         }         reactContext.startActivity(intent)     } } <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 2 \u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043d\u0430 Android<\/em><\/p>\n<p>\u041d\u0430 \u0447\u0442\u043e \u0442\u0443\u0442 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435? \u0414\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f, \u0441\u043f\u0435\u0440\u0432\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 <strong>ReactContextBaseJavaModule.<\/strong> \u042d\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 RN.<br \/> \u0414\u0430\u043d\u043d\u044b\u0439  \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 <strong>ReactApplicationContext<\/strong> &#8212; \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 React Native \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u0443\u044e\u0449\u0438\u043c \u0437\u0432\u0435\u043d\u043e\u043c \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c (Java \u0438\u043b\u0438 Kotlin) \u0438 JavaScript-\u043a\u043e\u0434\u043e\u043c. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b JavaScript \u0438\u0437 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.<\/p>\n<h4>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043b\u0430\u0441\u0441\u0430 NotificationStatusModule<\/h4>\n<ul>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>getName()<\/strong> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043c\u044f \u043c\u043e\u0434\u0443\u043b\u044f (&#171;NotificationStatus&#187;), \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 JS<\/p>\n<\/li>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 &#8212; <strong>checkFullNotificationStatus:<\/strong><\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"kotlin\">val result = Arguments.createMap() <\/code><\/pre>\n<p>\u0420\u0438\u0441. 3 \u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u0442 WritableMap &#8212; \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f React Native \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 JS<\/p>\n<pre><code class=\"kotlin\">val appEnabled = NotificationManagerCompat.from(reactContext).areNotificationsEnabled() result.putBoolean(\"appEnabled\", appEnabled) <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 4 \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 NotificationManagerCompat<\/em><\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 areNotificationsEnabled() \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043b\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/> \u041e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 true, \u0435\u0441\u043b\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0438 false, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b \u0438\u0445 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445<\/p>\n<pre><code class=\"kotlin\">val notificationManager = reactContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager val isDndEnabled = if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.M) {     val filter = notificationManager.currentInterruptionFilter     filter == NotificationManager.INTERRUPTION_FILTER_NONE ||      filter == NotificationManager.INTERRUPTION_FILTER_ALARMS } else false  <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 5 \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0440\u0435\u0436\u0438\u043c\u0430 &#171;\u041d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c&#187;<\/em><\/p>\n<p>\u041a\u043e\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u044e Android, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 API 23 (Android 6.0, Marshmallow) \u0438 \u0432\u044b\u0448\u0435.<br \/> \u0417\u0430\u0442\u0435\u043c \u043e\u043d \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 currentInterruptionFilter, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f:<\/p>\n<blockquote>\n<p>INTERRUPTION_FILTER_NONE \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b (\u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435).<\/p>\n<\/blockquote>\n<blockquote>\n<p>INTERRUPTION_FILTER_ALARMS \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438.<\/p>\n<\/blockquote>\n<p>\u0414\u043b\u044f \u0441\u0442\u0430\u0440\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 Android (\u0434\u043e API 23) \u043a\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 false, \u0442\u0430\u043a \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f currentInterruptionFilter \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430.<\/p>\n<pre><code class=\"kotlin\">result.putBoolean(\"doNotDisturb\", isDndEnabled) promise.resolve(result) <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 6 \u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f DND \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/em><\/p>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u0434\u0432\u0443\u043c\u044f \u043f\u043e\u043b\u044f\u043c\u0438:<\/p>\n<blockquote>\n<p>{<br \/> appEnabled: boolean, \/\/ \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043b\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<br \/> doNotDisturb: boolean \/\/ \u0410\u043a\u0442\u0438\u0432\u0435\u043d \u043b\u0438 \u0440\u0435\u0436\u0438\u043c &#171;\u041d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c&#187;<br \/> }<\/p>\n<\/blockquote>\n<ul>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434 <strong>openNotificationSettings:<\/strong><\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"kotlin\">val intent = Intent().apply {     action = Settings.ACTION_APP_NOTIFICATION_SETTINGS     putExtra(Settings.EXTRA_APP_PACKAGE, reactContext.packageName)     flags = Intent.FLAG_ACTIVITY_NEW_TASK } reactContext.startActivity(intent) <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 7 \u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/em><\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<br \/> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 Intent Android \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438:<\/p>\n<blockquote>\n<p>ACTION_APP_NOTIFICATION_SETTINGS &#8212; \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439<\/p>\n<\/blockquote>\n<blockquote>\n<p>EXTRA_APP_PACKAGE &#8212; \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c<\/p>\n<\/blockquote>\n<blockquote>\n<p>FLAG_ACTIVITY_NEW_TASK &#8212; \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443<\/p>\n<\/blockquote>\n<h4>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u00ab\u043f\u0430\u043a\u0435\u0442\u00bb<\/h4>\n<p>\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442? \u041c\u043e\u0434\u0443\u043b\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443 (NotificationStatusModule), \u0430 \u043f\u0430\u043a\u0435\u0442 &#8212; \u044d\u0442\u043e \u0444\u0430\u0431\u0440\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u043d\u0430\u0435\u0442 \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c.<\/p>\n<pre><code class=\"kotlin\">package com.myreactnativeapp  import com.facebook.react.ReactPackage import com.facebook.react.bridge.NativeModule import com.facebook.react.bridge.ReactApplicationContext import com.facebook.react.uimanager.ViewManager  class NotificationStatusPackage : ReactPackage { override fun createNativeModules(reactContext: ReactApplicationContext): List&lt;NativeModule&gt; { return listOf(NotificationStatusModule(reactContext)) }  override fun createViewManagers(reactContext: ReactApplicationContext): List&lt;ViewManager&lt;*, *&gt;&gt; { return emptyList() } } <\/code><\/pre>\n<p><em>\u0420\u0438\u0441. 8 \u041a\u043e\u0434 \u043f\u0430\u043a\u0435\u0442\u0430<\/em><\/p>\n<p>\u041f\u0430\u043a\u0435\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442:<\/p>\n<pre><code> 1. \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 \u043e\u0434\u0438\u043d \u043f\u0430\u043a\u0435\u0442:  2. \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438  3. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 <\/code><\/pre>\n<p>\u0427\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0431\u0435\u0437 \u043f\u0430\u043a\u0435\u0442\u0430? React Native \u043d\u0435 \u0441\u043c\u043e\u0433 \u0431\u044b:<\/p>\n<pre><code> 1. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0432\u0430\u0448 \u043c\u043e\u0434\u0443\u043b\u044c  2. \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c  3. \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e JavaScript-\u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f <\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u043f\u0430\u043a\u0435\u0442\u0430? \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0435\u0440\u0435\u0437 ReactInstanceManager, \u043d\u043e \u044d\u0442\u043e:<\/p>\n<pre><code> 1. \u0421\u043b\u043e\u0436\u043d\u0435\u0435 \u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435  2. \u041d\u0430\u0440\u0443\u0448\u0430\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 flow React Native  3. \u041c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u043c \u0446\u0438\u043a\u043b\u043e\u043c <\/code><\/pre>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<pre><code>1. React Native \u0438\u0449\u0435\u0442 \u0432\u0441\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0432 getPackages() 2. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 createNativeModules() 3. \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 NativeModuleRegistry 4. \u0414\u0435\u043b\u0430\u0435\u0442 \u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0432 JavaScript \u0447\u0435\u0440\u0435\u0437 NativeModules <\/code><\/pre>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0430\u043a\u0435\u0442 &#8212; \u044d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 &#171;\u043c\u043e\u0441\u0442&#187; \u043c\u0435\u0436\u0434\u0443 \u0432\u0430\u0448\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u0438 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 React Native.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0430\u043a\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043d\u0430\u0448\u0435\u043c <strong>MainApplication.kt<\/strong><\/p>\n<pre><code class=\"kotlin\">package com.myreactnativeapp  import android.app.Application import com.facebook.react.PackageList import com.facebook.react.ReactApplication import<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-459377","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/459377","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=459377"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/459377\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=459377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=459377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=459377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}