{"id":502680,"date":"2026-11-11T11:47:12","date_gmt":"2026-11-11T08:47:12","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=502680"},"modified":"2026-11-11T11:47:12","modified_gmt":"2026-11-11T08:47:12","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=502680","title":{"rendered":"\u0411\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u043e\u0447\u043d\u043e \u0437\u0432\u043e\u043d\u0438\u0442: \u0447\u0442\u043e \u044f \u0443\u0437\u043d\u0430\u043b \u043e \u0442\u043e\u0447\u043d\u044b\u0445 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f\u0445 \u043d\u0430 Android, \u043f\u043e\u043a\u0430 \u0434\u0435\u043b\u0430\u043b \u043f\u043b\u0430\u043d\u0435\u0440"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042f \u0434\u0435\u043b\u0430\u043b \u043f\u043b\u0430\u043d\u0435\u0440 \u0434\u043d\u044f \u043f\u043e\u0434 Android. \u0415\u0433\u043e \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0438\u0448\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f: \u0437\u0430\u043d\u044f\u0442\u0438\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u2014 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442. \u0423\u0442\u0440\u043e\u043c \u2014 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, <code>AlarmManager<\/code> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Android, \u0447\u0442\u043e \u0442\u0443\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e?<\/p>\n<p>\u041d\u0430 \u0434\u0435\u043b\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u00ab\u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0432 07:00\u00bb \u0438 \u00ab\u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u043a\u043e\u043b\u043e 07:00, \u0435\u0441\u043b\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0435 \u043f\u0440\u043e\u0442\u0438\u0432\u00bb \u2014 \u044d\u0442\u043e \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 API. \u041d\u0438\u0436\u0435 \u2014 \u0432\u0441\u0451, \u043d\u0430 \u0447\u0442\u043e \u044f \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u043b, \u0441 \u043a\u043e\u0434\u043e\u043c \u0438 \u0446\u0438\u0444\u0440\u0430\u043c\u0438 \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 (Realme GT Neo 2 \u043d\u0430 ColorOS \u0438 OnePlus 15R \u043d\u0430 Android 16).<\/p>\n<h3>1. \u041f\u043e\u0447\u0435\u043c\u0443 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0430\u0437\u0434\u044b\u0432\u0430\u044e\u0442<\/h3>\n<p>\u041f\u0440\u0438\u0447\u0438\u043d \u0442\u0440\u0438, \u0438 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u041f\u0435\u0440\u0432\u0430\u044f \u2014 <strong>Doze<\/strong>: \u043a\u043e\u0433\u0434\u0430 \u044d\u043a\u0440\u0430\u043d \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d \u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043b\u0435\u0436\u0438\u0442 \u043d\u0435\u043f\u043e\u0434\u0432\u0438\u0436\u043d\u043e, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043a\u043e\u043f\u0438\u0442 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0438\u0445 \u043f\u0430\u0447\u043a\u043e\u0439 \u0432 \u00ab\u043e\u043a\u043d\u0430\u0445 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f\u00bb, \u043f\u0440\u0438\u0447\u0451\u043c \u043e\u043a\u043d\u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0447\u0430\u0441\u0442\u044b\u0435, \u0430 \u043f\u043e\u0442\u043e\u043c \u0432\u0441\u0451 \u0440\u0435\u0436\u0435. \u0412\u0442\u043e\u0440\u0430\u044f \u2014 <strong>App Standby Buckets<\/strong>: \u0447\u0435\u043c \u0440\u0435\u0436\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u0435\u043c \u043d\u0438\u0436\u0435 \u0435\u0433\u043e \u00ab\u043a\u043e\u0440\u0437\u0438\u043d\u0430\u00bb \u0438 \u0442\u0435\u043c \u0440\u0435\u0436\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0435\u0433\u043e \u0431\u0443\u0434\u0438\u0442\u044c. \u0422\u0440\u0435\u0442\u044c\u044f \u2014 <strong>\u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439<\/strong>: \u043f\u043e\u0432\u0435\u0440\u0445 Android \u0443 Realme, Xiaomi, Huawei \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u00ab\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0431\u0430\u0442\u0430\u0440\u0435\u0438\u00bb.<\/p>\n<p>\u0417\u0430\u043c\u0435\u0440\u044b \u044d\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b\u0438. <code>setExactAndAllowWhileIdle<\/code> \u0432 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u043c Doze \u043d\u0430 Realme \u043f\u0440\u0438\u0448\u0451\u043b \u043d\u0430 134 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043f\u043e\u0437\u0436\u0435. \u041d\u0430 ColorOS \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043b\u044e\u0431\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u2014 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0435\u0433\u043e, \u043d\u043e \u0438 TickTick, \u0438 WhatsApp \u2014 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u043e\u043a\u043d\u043e \u0434\u043e \u0447\u0430\u0441\u0430, \u0434\u0430\u0436\u0435 \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0430 \u00ab\u0440\u0430\u0431\u043e\u0442\u0430 \u0431\u0435\u0437 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439\u00bb; \u044d\u0442\u043e \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438, \u0438 \u043e\u0431\u043e\u0439\u0442\u0438 \u0435\u0451 \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044f \u043d\u0435 \u043d\u0430\u0448\u0451\u043b \u043a\u0430\u043a. \u0420\u043e\u0432\u043d\u043e \u0432 \u043c\u0438\u043d\u0443\u0442\u0443 \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430\u0445 \u0437\u0432\u043e\u043d\u0438\u043b \u0442\u043e\u043b\u044c\u043a\u043e <code>setAlarmClock<\/code>.<\/p>\n<h3>2. \u0422\u0440\u0438 \u0443\u0440\u043e\u0432\u043d\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438<\/h3>\n<pre><code class=\"java\">AlarmManager am = (AlarmManager) ctx.getSystemService(Context.ALARM_SERVICE);\/\/ 1) \u00ab\u041a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043e\u043a\u043e\u043b\u043e\u00bb \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u043f\u0440\u0430\u0432\u0435 \u0441\u0434\u0432\u0438\u043d\u0443\u0442\u044c \u0438 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044cam.set(AlarmManager.RTC_WAKEUP, at, pi);\/\/ 2) \u0422\u043e\u0447\u043d\u043e, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0432 Doze, \u043d\u043e \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u044bam.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, at, pi);\/\/ 3) \u0411\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a: Doze \u0435\u0433\u043e \u043d\u0435 \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442am.setAlarmClock(new AlarmManager.AlarmClockInfo(at, showPi), pi);<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper\"><\/span><\/a><\/div><\/pre>\n<p>\u0417\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043b\u0430\u0442\u0438\u0442\u044c. <code>setExactAndAllowWhileIdle<\/code> \u0432 Doze \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043d\u0435 \u0447\u0430\u0449\u0435, \u0447\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0437 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (\u0442\u043e\u0447\u043d\u044b\u0435 \u0446\u0438\u0444\u0440\u044b \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 Android), \u043d\u043e \u0434\u043b\u044f \u00ab\u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u044f\u00bb \u044d\u0442\u043e\u0433\u043e \u0445\u0432\u0430\u0442\u0430\u0435\u0442: \u0437\u0430\u043d\u044f\u0442\u0438\u044f \u043d\u0435 \u0438\u0434\u0443\u0442 \u043a\u0430\u0436\u0434\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443.<\/p>\n<p><code>setAlarmClock<\/code> \u0447\u0435\u0441\u0442\u043d\u0435\u0435 \u0432\u0441\u0435\u0445: \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 Doze \u0437\u0430\u0440\u0430\u043d\u0435\u0435, \u0447\u0442\u043e\u0431\u044b \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043f\u0440\u043e\u0437\u0432\u0435\u043d\u0435\u043b \u0432\u043e\u0432\u0440\u0435\u043c\u044f. \u0417\u0430\u0442\u043e \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u043e\u043a \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430, \u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u2014 \u0432\u0440\u0435\u043c\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043f\u043b\u0430\u043d\u0435\u0440\u0435 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c: \u00ab\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435\u00bb \u0438\u043b\u0438 \u00ab\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u00bb \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u0430 \u043d\u0435 \u044f \u0437\u0430 \u043d\u0435\u0433\u043e.<\/p>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u043e\u0435:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0427\u0442\u043e<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0427\u0435\u043c \u0441\u0442\u0430\u0432\u0438\u043c<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041f\u043e\u0434\u044a\u0451\u043c, \u00ab\u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u00bb<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>setAlarmClock<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u043e \u043d\u0430\u0447\u0430\u043b\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u044f \u0438\u043b\u0438 \u0434\u0435\u043b\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>setExactAndAllowWhileIdle<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>setExact<\/code> \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u0443\u0436\u0434\u0435\u043d\u0438\u044f (<code>RTC<\/code>, \u043d\u0435 <code>RTC_WAKEUP<\/code>)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3>3. \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f: Android 12, 13, 14<\/h3>\n<p><strong>Android 12+ \u2014 \u0442\u043e\u0447\u043d\u044b\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438.<\/strong> \u041d\u0443\u0436\u0435\u043d <code>SCHEDULE_EXACT_ALARM<\/code> (\u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043c\u043e\u0436\u0435\u0442 \u0435\u0433\u043e \u043e\u0442\u043e\u0437\u0432\u0430\u0442\u044c) \u0438\u043b\u0438 <code>USE_EXACT_ALARM<\/code> (\u0435\u0433\u043e \u043d\u0435 \u043e\u0442\u0437\u044b\u0432\u0430\u044e\u0442, \u043d\u043e Google Play \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0435\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c, \u0433\u0434\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u0438\u043b\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f). \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0438\u043d\u0430\u0447\u0435 <code>setExact\u2026<\/code> \u0431\u0440\u043e\u0441\u0438\u0442 <code>SecurityException<\/code>:<\/p>\n<pre><code class=\"java\">static boolean canExact(Context ctx) {    AlarmManager am = (AlarmManager) ctx.getSystemService(Context.ALARM_SERVICE);    if (Build.VERSION.SDK_INT &gt;= 31) return am.canScheduleExactAlarms();    return true;}if (canExact(ctx)) am.setAlarmClock(new AlarmManager.AlarmClockInfo(at, show), fire);else am.setAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, at, fire);   \/\/ \u0445\u0443\u0436\u0435, \u043d\u043e \u043d\u0435 \u043f\u0430\u0434\u0430\u0435\u043c<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p><strong>Android 13+ \u2014 <\/strong><code><strong>POST_NOTIFICATIONS<\/strong><\/code><strong>.<\/strong> \u042f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u2014 \u043a\u043e\u0433\u0434\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0435\u0449\u0451 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0437\u0430\u0447\u0435\u043c \u043e\u043d\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u043e\u0439 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0441\u0430\u043c \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u043e \u0447\u0451\u043c \u0440\u0435\u0447\u044c.<\/p>\n<p><strong>Android 14+ \u2014 <\/strong><code><strong>USE_FULL_SCREEN_INTENT<\/strong><\/code><strong>.<\/strong> \u0411\u0435\u0437 \u043d\u0435\u0433\u043e \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043f\u0440\u0438 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435 \u043d\u0435 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d, \u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435\u043c. \u042d\u0442\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0436\u0435 \u0441\u0442\u0430\u043b\u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435 \u0432\u0441\u0435\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0438 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u0435\u0434\u0451\u043c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<pre><code class=\"java\">NotificationManager nm = ctx.getSystemService(NotificationManager.class);if (Build.VERSION.SDK_INT &gt;= 34 &amp;&amp; !nm.canUseFullScreenIntent()) {    Intent i = new Intent(Settings.ACTION_MANAGE_APP_USE_FULL_SCREEN_INTENT,            Uri.parse(\"package:\" + ctx.getPackageName()));    activity.startActivity(i);}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<h3>4. \u0417\u0432\u043e\u043d\u043e\u043a \u2014 \u043d\u0435 \u0432 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0438, \u0430 \u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0438\u0433\u0440\u0430\u043b\u0430 \u0437\u0432\u0443\u043a \u0441\u0430\u043c\u0438\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435\u043c: \u043a\u0430\u043d\u0430\u043b \u0441 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c, \u043c\u0435\u043b\u043e\u0434\u0438\u044f \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430. \u0420\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043f\u043e\u043a\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b: \u00ab\u041d\u0430\u0436\u0430\u043b \u201e\u0413\u043e\u0442\u043e\u0432\u043e&#187;, \u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0432\u0438\u0431\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00bb. \u0417\u0432\u0443\u043a \u0438 \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0436\u0438\u0432\u0443\u0442 \u0441\u0432\u043e\u0435\u0439 \u0436\u0438\u0437\u043d\u044c\u044e, \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u043e \u043f\u043e\u0433\u0430\u0441\u0438\u0442\u044c \u0438\u0445 \u0438\u0437 \u043a\u043e\u0434\u0430 \u043d\u0435\u043b\u044c\u0437\u044f.<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0436\u0438\u0432\u0443\u0449\u0438\u0439 foreground service, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0430\u043c \u0438\u0433\u0440\u0430\u0435\u0442 \u0437\u0432\u0443\u043a \u0438 \u0432\u0438\u0431\u0440\u0438\u0440\u0443\u0435\u0442, \u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043d\u043e\u043f\u043a\u0438:<\/p>\n<pre><code class=\"java\">\/\/ AlarmService: \u0437\u0432\u0443\u043a \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0442\u043e\u043a \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u2014 \u0435\u0433\u043e \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f, \u0438 \u043e\u043d \u0437\u0432\u0443\u0447\u0438\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u00ab\u041d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u00bb,\/\/ \u0435\u0441\u043b\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043b \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438MediaPlayer mp = new MediaPlayer();mp.setAudioAttributes(new AudioAttributes.Builder()        .setUsage(AudioAttributes.USAGE_ALARM)        .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)        .build());mp.setDataSource(this, alarmUri);mp.setLooping(true);mp.prepare();mp.start();\/\/ \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u044f \u0441 \u0442\u043e\u0439 \u0436\u0435 \u00ab\u0440\u043e\u043b\u044c\u044e\u00bb, \u0438\u043d\u0430\u0447\u0435 \u0432 \u0431\u0435\u0437\u0437\u0432\u0443\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0435\u0451 \u0441\u0440\u0435\u0436\u0443\u0442AudioAttributes aa = new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_ALARM).build();vibrator.vibrate(VibrationEffect.createWaveform(PATTERN, 0), aa);\/\/ \u043d\u0435 \u0434\u0430\u0451\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0443 \u0443\u0441\u043d\u0443\u0442\u044c, \u043d\u043e \u0438 \u043d\u0435 \u0437\u0432\u043e\u043d\u0438\u043c \u0432\u0435\u0447\u043d\u043ewake.acquire(MAX_RING_MS + 5000);           \/\/ MAX_RING_MS = 10 \u043c\u0438\u043d\u0443\u0442handler.postDelayed(this::stopRinging, MAX_RING_MS);<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0421\u0435\u0440\u0432\u0438\u0441 \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u0441 \u0442\u0438\u043f\u043e\u043c <code>FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK<\/code> (Android 10+), \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 \u2014 <code>FOREGROUND_SERVICE<\/code> \u0438 <code>FOREGROUND_SERVICE_MEDIA_PLAYBACK<\/code>. \u041a\u043d\u043e\u043f\u043a\u0438 \u00ab\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u00bb \u0438 \u00ab\u041e\u0442\u043b\u043e\u0436\u0438\u0442\u044c\u00bb \u0432 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0438 \u0438 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u043e\u043c \u043e\u043a\u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 <code>stopRinging()<\/code> \u0432 \u0442\u043e\u043c \u0436\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u2014 \u0438 \u0437\u0432\u0443\u043a \u0441 \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u0435\u0439 \u0433\u0430\u0441\u043d\u0443\u0442 \u0441\u0440\u0430\u0437\u0443.<\/p>\n<p>\u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c:<\/p>\n<pre><code class=\"java\">new NotificationCompat.Builder(this, CH)        .setCategory(NotificationCompat.CATEGORY_ALARM)        .setPriority(NotificationCompat.PRIORITY_MAX)        .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)        .setFullScreenIntent(fullPi, true)   \/\/ \u043e\u043a\u043d\u043e \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u043f\u043e\u0432\u0435\u0440\u0445 \u044d\u043a\u0440\u0430\u043d\u0430 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438        .setOngoing(true)        .addAction(0, \"\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c\", dismissPi)        .addAction(0, \"\u041e\u0442\u043b\u043e\u0436\u0438\u0442\u044c 10 \u043c\u0438\u043d\", snoozePi)        .build();<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p><strong>\u0413\u0440\u0430\u0431\u043b\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0443\u0448\u0451\u043b \u0432\u0435\u0447\u0435\u0440:<\/strong> \u0440\u0430\u0437 \u0437\u0432\u0443\u043a \u0438\u0433\u0440\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u00ab\u0442\u0438\u0445\u0438\u043c\u00bb \u0447\u0435\u0440\u0435\u0437 <code>setSilent(true)<\/code>. \u041d\u0435 \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0442\u0430\u043a: \u0442\u0438\u0445\u043e\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 full-screen intent, \u0438 \u043e\u043a\u043d\u043e \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f. \u0422\u0438\u0448\u0438\u043d\u0443 \u043b\u0443\u0447\u0448\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u0430\u043d\u0430\u043b\u043e\u043c \u0431\u0435\u0437 \u0437\u0432\u0443\u043a\u0430.<\/p>\n<h3>5. \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0412\u0441\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438 <code>AlarmManager<\/code> \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435. \u042d\u0442\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043d\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441\u044b:<\/p>\n<pre><code class=\"xml\">&lt;receiver android:name=\".BootReceiver\" android:exported=\"true\"&gt;    &lt;intent-filter&gt;        &lt;action android:name=\"android.intent.action.BOOT_COMPLETED\" \/&gt;        &lt;action android:name=\"android.intent.action.MY_PACKAGE_REPLACED\" \/&gt;    &lt;\/intent-filter&gt;&lt;\/receiver&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0421\u0430\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u0432 \u044f \u0445\u0440\u0430\u043d\u044e \u0432 <code>SharedPreferences<\/code>: \u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a \u0431\u0435\u0440\u0451\u0442 \u0435\u0433\u043e \u043e\u0442\u0442\u0443\u0434\u0430 \u0438 \u0441\u0442\u0430\u0432\u0438\u0442 \u0432\u0441\u0451 \u0437\u0430\u043d\u043e\u0432\u043e, \u043d\u0435 \u0434\u043e\u0436\u0438\u0434\u0430\u044f\u0441\u044c, \u043f\u043e\u043a\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043e\u0442\u043a\u0440\u043e\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. <code>MY_PACKAGE_REPLACED<\/code> \u043d\u0443\u0436\u0435\u043d \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u043e\u0436\u0435 \u0441\u043d\u0438\u043c\u0430\u0435\u0442 \u0435\u0433\u043e \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438: \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u0432\u0435\u0447\u0435\u0440\u043e\u043c \u2014 \u0438 \u0443\u0442\u0440\u043e\u043c \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043c\u043e\u043b\u0447\u0438\u0442.<\/p>\n<p>\u0423 \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430: \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u00ab\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0438\u0442\u044c\u00bb \u0442\u043e, \u0447\u0442\u043e \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0443\u0436\u0435 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u0441\u0442\u0430\u0432\u0438\u0442\u044c. \u0423 \u043c\u0435\u043d\u044f \u0441\u0442\u0430\u0440\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0430\u043c\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u043b\u0438 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043f\u043e\u0434\u044a\u0451\u043c\u0430, \u043d\u043e\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0430, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043e\u0442\u043a\u0440\u044b\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043f\u0440\u043e\u0437\u0432\u0435\u043d\u0435\u043b. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u044f\u043c\u043e \u0432 \u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a\u0435.<\/p>\n<p>\u0418 \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044c: <code>BOOT_COMPLETED<\/code> \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0415\u0441\u043b\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0441\u044f \u043d\u043e\u0447\u044c\u044e \u0441\u0430\u043c (\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b), \u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043d\u0435 \u043f\u0440\u043e\u0437\u0432\u0435\u043d\u0438\u0442, \u043f\u043e\u043a\u0430 \u0435\u0433\u043e \u043d\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442. \u041b\u0435\u0447\u0438\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <code>LOCKED_BOOT_COMPLETED<\/code> \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 device-protected storage \u2014 \u0442\u0430\u043a \u0443 \u043c\u0435\u043d\u044f \u0442\u0435\u043f\u0435\u0440\u044c \u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u043e.<\/p>\n<h3>6. \u0427\u0430\u0441\u043e\u0432\u044b\u0435 \u043f\u043e\u044f\u0441\u0430<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043a\u0430\u043a \u00ab07:00 \u043f\u043e \u043c\u0435\u0441\u0442\u043d\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438\u00bb, \u0430 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 <code>AlarmManager<\/code> \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445, \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u043b\u0451\u0442\u0430 \u0432\u0441\u0451 \u0443\u0435\u0434\u0435\u0442 \u043d\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043f\u043e\u044f\u0441\u043e\u0432. \u042f \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e \u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043f\u0440\u0438 \u0441\u043c\u0435\u043d\u0435 \u043f\u043e\u044f\u0441\u0430: \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u0432\u0448\u0438\u0439 \u0438\u0437 \u041c\u043e\u0441\u043a\u0432\u044b \u0432 \u0411\u0430\u043d\u0433\u043a\u043e\u043a, \u0445\u043e\u0447\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u0430\u0442\u044c \u0432 07:00 \u043f\u043e-\u0431\u0430\u043d\u0433\u043a\u043e\u043a\u0441\u043a\u0438, \u0430 \u043d\u0435 \u0432 11:00.<\/p>\n<h3>7. \u041a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c<\/h3>\n<p>\u0416\u0434\u0430\u0442\u044c \u0441\u0443\u0442\u043a\u0438, \u043f\u043e\u043a\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0443\u0441\u043d\u0451\u0442 \u0441\u0430\u043c, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e:<\/p>\n<pre><code class=\"bash\"># \u043a\u0430\u043a\u0438\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438 \u0441\u0442\u043e\u044f\u0442 \u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044fadb shell dumpsys alarm | grep -A3 com.example.app# \u0437\u0430\u0433\u043d\u0430\u0442\u044c \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0432 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0439 Doze \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441adb shell dumpsys battery unplugadb shell dumpsys deviceidle force-idle# \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u0430\u043a \u0431\u044b\u043b\u043eadb shell dumpsys deviceidle unforceadb shell dumpsys battery reset<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0418\u0437 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u043f\u0430\u0440\u0443 \u0441\u043e\u0432\u0435\u0442\u043e\u0432. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0447\u0435\u0440\u0435\u0437 <code>dumpsys alarm<\/code>, \u0447\u0442\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u0432\u043a\u043b\u044e\u0447\u0430\u0439\u0442\u0435 <code>force-idle<\/code>. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438 (\u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a), \u043e\u043d\u043e \u0441\u043e\u0442\u0440\u0451\u0442 \u0432\u0430\u0448\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u043b\u0443\u0447\u0448\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u00ab\u043f\u043e-\u0447\u0435\u0441\u0442\u043d\u043e\u043c\u0443\u00bb \u2014 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u0435 \u0432 \u043f\u043b\u0430\u043d\u0435 \u2014 \u0438 \u043f\u043e\u0442\u043e\u043c \u0443\u0434\u0430\u043b\u044f\u0442\u044c. \u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430\u0445 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430\u043c\u0438: \u0447\u0438\u0441\u0442\u044b\u0439 Android \u0438 ColorOS \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443.<\/p>\n<h3>\u0418\u0442\u043e\u0433<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435, \u0442\u043e, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u043e\u0437\u0432\u0435\u043d\u0435\u0442\u044c \u00ab\u0440\u043e\u0432\u043d\u043e\u00bb, \u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 <code>setAlarmClock<\/code>, \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u2014 \u0447\u0435\u0440\u0435\u0437 <code>setExactAndAllowWhileIdle<\/code>. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 <code>canScheduleExactAlarms()<\/code> \u0438 \u0438\u043c\u0435\u0439\u0442\u0435 \u0437\u0430\u043f\u0430\u0441\u043d\u043e\u0439 \u043f\u0443\u0442\u044c \u0431\u0435\u0437 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. <code>POST_NOTIFICATIONS<\/code> \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0439\u0442\u0435 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u0430\u0447\u0435\u043c, \u0430 \u043d\u0430 Android 14+ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u0435\u0449\u0451 \u0438 <code>canUseFullScreenIntent()<\/code>.<\/p>\n<p>\u0417\u0432\u0443\u043a \u0438 \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u044e \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u0438\u0433\u0440\u0430\u0439\u0442\u0435 \u0432 foreground service \u0441 <code>USAGE_ALARM<\/code>, \u0430 \u043d\u0435 \u0432 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0438, \u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>setSilent()<\/code> \u043d\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0438 \u0441 full-screen intent. \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0439\u0442\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438 \u043d\u0430 <code>BOOT_COMPLETED<\/code> \u0438 <code>MY_PACKAGE_REPLACED<\/code> \u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u0439\u0442\u0435 \u043e <code>LOCKED_BOOT_COMPLETED<\/code>; \u043f\u0440\u0438 \u0441\u043c\u0435\u043d\u0435 \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430 \u0438\u0445 \u0442\u043e\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c. \u0410 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 Doze \u0447\u0435\u0440\u0435\u0437 <code>adb<\/code> \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0434\u043d\u0438 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<p>\u0411\u0443\u0434\u0443 \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u0442\u0435, \u043a\u0430\u043a \u0441 \u044d\u0442\u0438\u043c \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f Xiaomi \u0438 Samsung \u2014 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u0431\u044b\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e Realme \u0438 OnePlus.<\/p>\n<p><em>\u0412\u0441\u0451 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u043c\u043e\u0451\u043c \u043f\u043b\u0430\u043d\u0435\u0440\u0435 \u0434\u043d\u044f \u00ab\u0420\u0438\u0442\u043c\u00bb (Android, \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439).<\/em><\/p>\n<\/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=\"https:\/\/habr.com\/ru\/articles\/1106440\/\">https:\/\/habr.com\/ru\/articles\/1106440\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u042f \u0434\u0435\u043b\u0430\u043b \u043f\u043b\u0430\u043d\u0435\u0440 \u0434\u043d\u044f \u043f\u043e\u0434 Android. \u0415\u0433\u043e \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0438\u0448\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f: \u0437\u0430\u043d\u044f\u0442\u0438\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u2014 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442. \u0423\u0442\u0440\u043e\u043c \u2014 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, AlarmManager \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Android, \u0447\u0442\u043e \u0442\u0443\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e?\u041d\u0430 \u0434\u0435\u043b\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u00ab\u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0432 07:00\u00bb \u0438 \u00ab\u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u043a\u043e\u043b\u043e 07:00, \u0435\u0441\u043b\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0435 \u043f\u0440\u043e\u0442\u0438\u0432\u00bb \u2014 \u044d\u0442\u043e \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 API. \u041d\u0438\u0436\u0435 \u2014 \u0432\u0441\u0451, \u043d\u0430 \u0447\u0442\u043e \u044f \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u043b, \u0441 \u043a\u043e\u0434\u043e\u043c \u0438 \u0446\u0438\u0444\u0440\u0430\u043c\u0438 \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 (Realme GT Neo 2 \u043d\u0430 ColorOS \u0438 OnePlus 15R \u043d\u0430 Android 16).1. \u041f\u043e\u0447\u0435\u043c\u0443 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0430\u0437\u0434\u044b\u0432\u0430\u044e\u0442\u041f\u0440\u0438\u0447\u0438\u043d \u0442\u0440\u0438, \u0438 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u041f\u0435\u0440\u0432\u0430\u044f \u2014 Doze: \u043a\u043e\u0433\u0434\u0430 \u044d\u043a\u0440\u0430\u043d \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d \u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043b\u0435\u0436\u0438\u0442 \u043d\u0435\u043f\u043e\u0434\u0432\u0438\u0436\u043d\u043e, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043a\u043e\u043f\u0438\u0442 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0438\u0445 \u043f\u0430\u0447\u043a\u043e\u0439 \u0432 \u00ab\u043e\u043a\u043d\u0430\u0445 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f\u00bb, \u043f\u0440\u0438\u0447\u0451\u043c \u043e\u043a\u043d\u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0447\u0430\u0441\u0442\u044b\u0435, \u0430 \u043f\u043e\u0442\u043e\u043c \u0432\u0441\u0451 \u0440\u0435\u0436\u0435. \u0412\u0442\u043e\u0440\u0430\u044f \u2014 App Standby Buckets: \u0447\u0435\u043c \u0440\u0435\u0436\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u0435\u043c \u043d\u0438\u0436\u0435 \u0435\u0433\u043e \u00ab\u043a\u043e\u0440\u0437\u0438\u043d\u0430\u00bb \u0438 \u0442\u0435\u043c \u0440\u0435\u0436\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0435\u0433\u043e \u0431\u0443\u0434\u0438\u0442\u044c. \u0422\u0440\u0435\u0442\u044c\u044f \u2014 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439: \u043f\u043e\u0432\u0435\u0440\u0445 Android \u0443 Realme, Xiaomi, Huawei \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u00ab\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0431\u0430\u0442\u0430\u0440\u0435\u0438\u00bb.\u0417\u0430\u043c\u0435\u0440\u044b \u044d\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b\u0438. setExactAndAllowWhileIdle \u0432 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u043c Doze \u043d\u0430 Realme \u043f\u0440\u0438\u0448\u0451\u043b \u043d\u0430 134 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043f\u043e\u0437\u0436\u0435. \u041d\u0430 ColorOS \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043b\u044e\u0431\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u2014 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0435\u0433\u043e, \u043d\u043e \u0438 TickTick, \u0438 WhatsApp \u2014 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u043e\u043a\u043d\u043e \u0434\u043e \u0447\u0430\u0441\u0430, \u0434\u0430\u0436\u0435 \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0430 \u00ab\u0440\u0430\u0431\u043e\u0442\u0430 \u0431\u0435\u0437 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439\u00bb; \u044d\u0442\u043e \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438, \u0438 \u043e\u0431\u043e\u0439\u0442\u0438 \u0435\u0451 \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044f \u043d\u0435 \u043d\u0430\u0448\u0451\u043b \u043a\u0430\u043a. \u0420\u043e\u0432\u043d\u043e \u0432 \u043c\u0438\u043d\u0443\u0442\u0443 \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430\u0445 \u0437\u0432\u043e\u043d\u0438\u043b \u0442\u043e\u043b\u044c\u043a\u043e setAlarmClock.2. \u0422\u0440\u0438 \u0443\u0440\u043e\u0432\u043d\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438AlarmManager am = (AlarmManager) ctx.getSystemService(Context.ALARM_SERVICE);\/\/ 1) \u00ab\u041a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043e\u043a\u043e\u043b\u043e\u00bb \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u043f\u0440\u0430\u0432\u0435 \u0441\u0434\u0432\u0438\u043d\u0443\u0442\u044c \u0438 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044cam.set(AlarmManager.RTC_WAKEUP, at, pi);\/\/ 2) \u0422\u043e\u0447\u043d\u043e, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0432 Doze, \u043d\u043e \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u044bam.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, at, pi);\/\/ 3) \u0411\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a: Doze \u0435\u0433\u043e \u043d\u0435 \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442am.setAlarmClock(new AlarmManager.AlarmClockInfo(at, showPi), pi);\u0417\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043b\u0430\u0442\u0438\u0442\u044c. setExactAndAllowWhileIdle \u0432 Doze \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043d\u0435 \u0447\u0430\u0449\u0435, \u0447\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0437 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (\u0442\u043e\u0447\u043d\u044b\u0435 \u0446\u0438\u0444\u0440\u044b \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 Android), \u043d\u043e \u0434\u043b\u044f \u00ab\u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u044f\u00bb \u044d\u0442\u043e\u0433\u043e \u0445\u0432\u0430\u0442\u0430\u0435\u0442: \u0437\u0430\u043d\u044f\u0442\u0438\u044f \u043d\u0435 \u0438\u0434\u0443\u0442 \u043a\u0430\u0436\u0434\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443.setAlarmClock \u0447\u0435\u0441\u0442\u043d\u0435\u0435 \u0432\u0441\u0435\u0445: \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 Doze \u0437\u0430\u0440\u0430\u043d\u0435\u0435, \u0447\u0442\u043e\u0431\u044b \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043f\u0440\u043e\u0437\u0432\u0435\u043d\u0435\u043b \u0432\u043e\u0432\u0440\u0435\u043c\u044f. \u0417\u0430\u0442\u043e \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u043e\u043a \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430, \u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u2014 \u0432\u0440\u0435\u043c\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043f\u043b\u0430\u043d\u0435\u0440\u0435 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c: \u00ab\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435\u00bb \u0438\u043b\u0438 \u00ab\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u00bb \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u0430 \u043d\u0435 \u044f \u0437\u0430 \u043d\u0435\u0433\u043e.\u0418\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u043e\u0435:\u0427\u0442\u043e\u0427\u0435\u043c \u0441\u0442\u0430\u0432\u0438\u043c\u041f\u043e\u0434\u044a\u0451\u043c, \u00ab\u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u00bbsetAlarmClock\u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u043e \u043d\u0430\u0447\u0430\u043b\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u044f \u0438\u043b\u0438 \u0434\u0435\u043b\u0430setExactAndAllowWhileIdle\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430setExact \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u0443\u0436\u0434\u0435\u043d\u0438\u044f (RTC, \u043d\u0435 RTC_WAKEUP)3. \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f: Android 12, 13, 14Android 12+ \u2014 \u0442\u043e\u0447\u043d\u044b\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438. \u041d\u0443\u0436\u0435\u043d SCHEDULE_EXACT_ALARM (\u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043c\u043e\u0436\u0435\u0442 \u0435\u0433\u043e \u043e\u0442\u043e\u0437\u0432\u0430\u0442\u044c) \u0438\u043b\u0438 USE_EXACT_ALARM (\u0435\u0433\u043e \u043d\u0435 \u043e\u0442\u0437\u044b\u0432\u0430\u044e\u0442, \u043d\u043e Google Play \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0435\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c, \u0433\u0434\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u0438\u043b\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f). \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0438\u043d\u0430\u0447\u0435 setExact\u2026 \u0431\u0440\u043e\u0441\u0438\u0442 SecurityException:static boolean canExact(Context ctx) {    AlarmManager am = (AlarmManager) ctx.getSystemService(Context.ALARM_SERVICE);    if (Build.VERSION.SDK_INT &gt;= 31) return am.canScheduleExactAlarms();    return true;}if (canExact(ctx)) am.setAlarmClock(new AlarmManager.AlarmClockInfo(at, show), fire);else am.setAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, at, fire);   \/\/ \u0445\u0443\u0436\u0435, \u043d\u043e \u043d\u0435 \u043f\u0430\u0434\u0430\u0435\u043cAndroid 13+ \u2014 POST_NOTIFICATIONS. \u042f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u2014 \u043a\u043e\u0433\u0434\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0435\u0449\u0451 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0437\u0430\u0447\u0435\u043c \u043e\u043d\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u043e\u0439 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0441\u0430\u043c \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u043e \u0447\u0451\u043c \u0440\u0435\u0447\u044c.Android 14+ \u2014 USE_FULL_SCREEN_INTENT. \u0411\u0435\u0437 \u043d\u0435\u0433\u043e \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043f\u0440\u0438 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435 \u043d\u0435 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d, \u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435\u043c. \u042d\u0442\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0436\u0435 \u0441\u0442\u0430\u043b\u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435 \u0432\u0441\u0435\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0438 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u0435\u0434\u0451\u043c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:NotificationManager nm = ctx.getSystemService(NotificationManager.class);if (Build.VERSION.SDK_INT &gt;= 34 &amp;&amp; !nm.canUseFullScreenIntent()) {    Intent i = new Intent(Settings.ACTION_MANAGE_APP_USE_FULL_SCREEN_INTENT,            Uri.parse(&#171;package:&#187; + ctx.getPackageName()));    activity.startActivity(i);}4. \u0417\u0432\u043e\u043d\u043e\u043a \u2014 \u043d\u0435 \u0432 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0438, \u0430 \u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0435\u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0438\u0433\u0440\u0430\u043b\u0430 \u0437\u0432\u0443\u043a \u0441\u0430\u043c\u0438\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435\u043c: \u043a\u0430\u043d\u0430\u043b \u0441 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c, \u043c\u0435\u043b\u043e\u0434\u0438\u044f \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430. \u0420\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043f\u043e\u043a\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b: \u00ab\u041d\u0430\u0436\u0430\u043b \u201e\u0413\u043e\u0442\u043e\u0432\u043e&#187;, \u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0432\u0438\u0431\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00bb. \u0417\u0432\u0443\u043a \u0438 \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0436\u0438\u0432\u0443\u0442 \u0441\u0432\u043e\u0435\u0439 \u0436\u0438\u0437\u043d\u044c\u044e, \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u043e \u043f\u043e\u0433\u0430\u0441\u0438\u0442\u044c \u0438\u0445 \u0438\u0437 \u043a\u043e\u0434\u0430 \u043d\u0435\u043b\u044c\u0437\u044f.\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0436\u0438\u0432\u0443\u0449\u0438\u0439 foreground service, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0430\u043c \u0438\u0433\u0440\u0430\u0435\u0442 \u0437\u0432\u0443\u043a \u0438 \u0432\u0438\u0431\u0440\u0438\u0440\u0443\u0435\u0442, \u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043d\u043e\u043f\u043a\u0438:\/\/ AlarmService: \u0437\u0432\u0443\u043a \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0442\u043e\u043a \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u2014 \u0435\u0433\u043e \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f, \u0438 \u043e\u043d \u0437\u0432\u0443\u0447\u0438\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u00ab\u041d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u00bb,\/\/ \u0435\u0441\u043b\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043b \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438MediaPlayer mp = new MediaPlayer();mp.setAudioAttributes(new AudioAttributes.Builder()        .setUsage(AudioAttributes.USAGE_ALARM)        .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)        .build());mp.setDataSource(this, alarmUri);mp.setLooping(true);mp.prepare();mp.start();\/\/ \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u044f \u0441 \u0442\u043e\u0439 \u0436\u0435 \u00ab\u0440\u043e\u043b\u044c\u044e\u00bb, \u0438\u043d\u0430\u0447\u0435 \u0432 \u0431\u0435\u0437\u0437\u0432\u0443\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0435\u0451 \u0441\u0440\u0435\u0436\u0443\u0442AudioAttributes aa = new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_ALARM).build();vibrator.vibrate(VibrationEffect.createWaveform(PATTERN, 0), aa);\/\/ \u043d\u0435 \u0434\u0430\u0451\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0443 \u0443\u0441\u043d\u0443\u0442\u044c, \u043d\u043e \u0438 \u043d\u0435 \u0437\u0432\u043e\u043d\u0438\u043c \u0432\u0435\u0447\u043d\u043ewake.acquire(MAX_RING_MS + 5000);           \/\/ MAX_RING_MS = 10 \u043c\u0438\u043d\u0443\u0442handler.postDelayed(this::stopRinging, MAX_RING_MS);\u0421\u0435\u0440\u0432\u0438\u0441 \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u0441 \u0442\u0438\u043f\u043e\u043c FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK (Android 10+), \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 \u2014 FOREGROUND_SERVICE \u0438 FOREGROUND_SERVICE_MEDIA_PLAYBACK. \u041a\u043d\u043e\u043f\u043a\u0438 \u00ab\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u00bb \u0438 \u00ab\u041e\u0442\u043b\u043e\u0436\u0438\u0442\u044c\u00bb \u0432 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0438 \u0438 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u043e\u043c \u043e\u043a\u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 stopRinging() \u0432 \u0442\u043e\u043c \u0436\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u2014 \u0438 \u0437\u0432\u0443\u043a \u0441 \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u0435\u0439 \u0433\u0430\u0441\u043d\u0443\u0442 \u0441\u0440\u0430\u0437\u0443.\u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c:new NotificationCompat.Builder(this, CH)        .setCategory(NotificationCompat.CATEGORY_ALARM)        .setPriority(NotificationCompat.PRIORITY_MAX)        .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)        .setFullScreenIntent(fullPi, true)   \/\/ \u043e\u043a\u043d\u043e \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u043f\u043e\u0432\u0435\u0440\u0445 \u044d\u043a\u0440\u0430\u043d\u0430 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438        .setOngoing(true)        .addAction(0, &#171;\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c&#187;, dismissPi)        .addAction(0, &#171;\u041e\u0442\u043b\u043e\u0436\u0438\u0442\u044c 10 \u043c\u0438\u043d&#187;, snoozePi)        .build();\u0413\u0440\u0430\u0431\u043b\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0443\u0448\u0451\u043b \u0432\u0435\u0447\u0435\u0440: \u0440\u0430\u0437 \u0437\u0432\u0443\u043a \u0438\u0433\u0440\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u00ab\u0442\u0438\u0445\u0438\u043c\u00bb \u0447\u0435\u0440\u0435\u0437 setSilent(true). \u041d\u0435 \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0442\u0430\u043a: \u0442\u0438\u0445\u043e\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 full-screen intent, \u0438 \u043e\u043a\u043d\u043e \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f. \u0422\u0438\u0448\u0438\u043d\u0443 \u043b\u0443\u0447\u0448\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u0430\u043d\u0430\u043b\u043e\u043c \u0431\u0435\u0437 \u0437\u0432\u0443\u043a\u0430.5. \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0412\u0441\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438 AlarmManager \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435. \u042d\u0442\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043d\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441\u044b:&lt;receiver android:name=&#187;.BootReceiver&#187; android:exported=&#187;true&#187;&gt;    &lt;intent-filter&gt;        &lt;action android:name=&#187;android.intent.action.BOOT_COMPLETED&#187; \/&gt;        &lt;action android:name=&#187;android.intent.action.MY_PACKAGE_REPLACED&#187; \/&gt;    &lt;\/intent-filter&gt;&lt;\/receiver&gt;\u0421\u0430\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u0432 \u044f \u0445\u0440\u0430\u043d\u044e \u0432 SharedPreferences: \u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a \u0431\u0435\u0440\u0451\u0442 \u0435\u0433\u043e \u043e\u0442\u0442\u0443\u0434\u0430 \u0438 \u0441\u0442\u0430\u0432\u0438\u0442 \u0432\u0441\u0451 \u0437\u0430\u043d\u043e\u0432\u043e, \u043d\u0435 \u0434\u043e\u0436\u0438\u0434\u0430\u044f\u0441\u044c, \u043f\u043e\u043a\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043e\u0442\u043a\u0440\u043e\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. MY_PACKAGE_REPLACED \u043d\u0443\u0436\u0435\u043d \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u043e\u0436\u0435 \u0441\u043d\u0438\u043c\u0430\u0435\u0442 \u0435\u0433\u043e \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438: \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u0432\u0435\u0447\u0435\u0440\u043e\u043c \u2014 \u0438 \u0443\u0442\u0440\u043e\u043c \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043c\u043e\u043b\u0447\u0438\u0442.\u0423 \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430: \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u00ab\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0438\u0442\u044c\u00bb \u0442\u043e, \u0447\u0442\u043e \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0443\u0436\u0435 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u0441\u0442\u0430\u0432\u0438\u0442\u044c. \u0423 \u043c\u0435\u043d\u044f \u0441\u0442\u0430\u0440\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0430\u043c\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u043b\u0438 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043f\u043e\u0434\u044a\u0451\u043c\u0430, \u043d\u043e\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0430, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043e\u0442\u043a\u0440\u044b\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043f\u0440\u043e\u0437\u0432\u0435\u043d\u0435\u043b. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u044f\u043c\u043e \u0432 \u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a\u0435.\u0418 \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044c: BOOT_COMPLETED \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0415\u0441\u043b\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0441\u044f \u043d\u043e\u0447\u044c\u044e \u0441\u0430\u043c (\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b), \u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043d\u0435 \u043f\u0440\u043e\u0437\u0432\u0435\u043d\u0438\u0442, \u043f\u043e\u043a\u0430 \u0435\u0433\u043e \u043d\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442. \u041b\u0435\u0447\u0438\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 LOCKED_BOOT_COMPLETED \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 device-protected storage \u2014 \u0442\u0430\u043a \u0443 \u043c\u0435\u043d\u044f \u0442\u0435\u043f\u0435\u0440\u044c \u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u043e.6. \u0427\u0430\u0441\u043e\u0432\u044b\u0435 \u043f\u043e\u044f\u0441\u0430\u0415\u0441\u043b\u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043a\u0430\u043a \u00ab07:00 \u043f\u043e \u043c\u0435\u0441\u0442\u043d\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438\u00bb, \u0430 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 AlarmManager \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445, \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u043b\u0451\u0442\u0430 \u0432\u0441\u0451 \u0443\u0435\u0434\u0435\u0442 \u043d\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043f\u043e\u044f\u0441\u043e\u0432. \u042f \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e \u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043f\u0440\u0438 \u0441\u043c\u0435\u043d\u0435 \u043f\u043e\u044f\u0441\u0430: \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u0432\u0448\u0438\u0439 \u0438\u0437 \u041c\u043e\u0441\u043a\u0432\u044b \u0432 \u0411\u0430\u043d\u0433\u043a\u043e\u043a, \u0445\u043e\u0447\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u0430\u0442\u044c \u0432 07:00 \u043f\u043e-\u0431\u0430\u043d\u0433\u043a\u043e\u043a\u0441\u043a\u0438, \u0430 \u043d\u0435 \u0432 11:00.7. \u041a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c\u0416\u0434\u0430\u0442\u044c \u0441\u0443\u0442\u043a\u0438, \u043f\u043e\u043a\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0443\u0441\u043d\u0451\u0442 \u0441\u0430\u043c, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e:# \u043a\u0430\u043a\u0438\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438 \u0441\u0442\u043e\u044f\u0442 \u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044fadb shell dumpsys alarm | grep -A3 com.example.app# \u0437\u0430\u0433\u043d\u0430\u0442\u044c \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0432 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0439 Doze \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441adb shell dumpsys battery unplugadb shell dumpsys deviceidle force-idle# \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u0430\u043a \u0431\u044b\u043b\u043eadb shell dumpsys deviceidle unforceadb shell dumpsys battery reset\u0418\u0437 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u043f\u0430\u0440\u0443 \u0441\u043e\u0432\u0435\u0442\u043e\u0432. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0447\u0435\u0440\u0435\u0437 dumpsys alarm, \u0447\u0442\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u0432\u043a\u043b\u044e\u0447\u0430\u0439\u0442\u0435 force-idle. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438 (\u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a), \u043e\u043d\u043e \u0441\u043e\u0442\u0440\u0451\u0442 \u0432\u0430\u0448\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u043b\u0443\u0447\u0448\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u00ab\u043f\u043e-\u0447\u0435\u0441\u0442\u043d\u043e\u043c\u0443\u00bb \u2014 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u0435 \u0432 \u043f\u043b\u0430\u043d\u0435 \u2014 \u0438 \u043f\u043e\u0442\u043e\u043c \u0443\u0434\u0430\u043b\u044f\u0442\u044c. \u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430\u0445 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430\u043c\u0438: \u0447\u0438\u0441\u0442\u044b\u0439 Android \u0438 ColorOS \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443.\u0418\u0442\u043e\u0433\u0415\u0441\u043b\u0438 \u0441\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435, \u0442\u043e, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u043e\u0437\u0432\u0435\u043d\u0435\u0442\u044c \u00ab\u0440\u043e\u0432\u043d\u043e\u00bb, \u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 setAlarmClock, \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u2014 \u0447\u0435\u0440\u0435\u0437 setExactAndAllowWhileIdle. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 canScheduleExactAlarms() \u0438 \u0438\u043c\u0435\u0439\u0442\u0435 \u0437\u0430\u043f\u0430\u0441\u043d\u043e\u0439 \u043f\u0443\u0442\u044c \u0431\u0435\u0437 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. POST_NOTIFICATIONS \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0439\u0442\u0435 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u0430\u0447\u0435\u043c, \u0430 \u043d\u0430 Android 14+ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u0435\u0449\u0451 \u0438 canUseFullScreenIntent().\u0417\u0432\u0443\u043a \u0438 \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u044e \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u0438\u0433\u0440\u0430\u0439\u0442\u0435 \u0432 foreground service \u0441 USAGE_ALARM, \u0430 \u043d\u0435 \u0432 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0438, \u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 setSilent() \u043d\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0438 \u0441 full-screen intent. \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0439\u0442\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438 \u043d\u0430 BOOT_COMPLETED \u0438 MY_PACKAGE_REPLACED \u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u0439\u0442\u0435 \u043e LOCKED_BOOT_COMPLETED; \u043f\u0440\u0438 \u0441\u043c\u0435\u043d\u0435 \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430 \u0438\u0445 \u0442\u043e\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c. \u0410 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 Doze \u0447\u0435\u0440\u0435\u0437 adb \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0434\u043d\u0438 \u0442\u0435\u0441\u0442\u043e\u0432.\u0411\u0443\u0434\u0443 \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u0442\u0435, \u043a\u0430\u043a \u0441 \u044d\u0442\u0438\u043c \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f Xiaomi \u0438 Samsung \u2014 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u0431\u044b\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e Realme \u0438 OnePlus.\u0412\u0441\u0451 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u043c\u043e\u0451\u043c \u043f\u043b\u0430\u043d\u0435\u0440\u0435 \u0434\u043d\u044f \u00ab\u0420\u0438\u0442\u043c\u00bb (Android, \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439).\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 https:\/\/habr.com\/ru\/articles\/1106440\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-502680","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/502680","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=502680"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/502680\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=502680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=502680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=502680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}