{"id":834,"date":"2025-07-28T14:10:50","date_gmt":"2025-07-28T14:10:50","guid":{"rendered":"https:\/\/nurlandroid.com\/?p=834"},"modified":"2025-07-28T14:10:51","modified_gmt":"2025-07-28T14:10:51","slug":"workmanager-%d0%b7%d0%b0%d1%87%d0%b5%d0%bc-%d0%bd%d1%83%d0%b6%d0%b5%d0%bd-%d0%b8-%d0%ba%d0%b0%d0%ba-%d0%b8%d1%81%d0%bf%d0%be%d0%bb%d1%8c%d0%b7%d1%83%d0%b5%d1%82%d1%81%d1%8f","status":"publish","type":"post","link":"https:\/\/nurlandroid.com\/?p=834","title":{"rendered":"WorkManager \u2014 \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d \u0438 \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f?"},"content":{"rendered":"\n<p>\u041e\u0442\u0432\u0435\u0442: <code>WorkManager<\/code> \u2014 \u044d\u0442\u043e <strong>API \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u043e\u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u0434\u0430\u0447<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0411\u0414 (Room), \u0438 <strong>\u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e<\/strong>, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438: \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u043e, \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0431\u0438\u0442, \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043e<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c <strong>\u043e\u0442\u043b\u043e\u0436\u0435\u043d\u044b<\/strong>, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b <strong>\u043f\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c<\/strong> (Wi-Fi, \u0437\u0430\u0440\u044f\u0434\u043a\u0430 \u0438 \u0442.\u043f.)<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c <strong>\u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u043c\u0438\u0441\u044f<\/strong> (periodic)<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>WorkManager<\/code>?<\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439<\/th><th>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c WorkManager?<\/th><\/tr><\/thead><tbody><tr><td>\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435<\/td><td>\u0414\u0430<\/td><\/tr><tr><td>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043b\u043e\u0433\u043e\u0432 \/ \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043d\u043e\u0447\u044c\u044e<\/td><td>\u0414\u0430<\/td><\/tr><tr><td>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u0435\u0434\u0438\u0430\u0444\u0430\u0439\u043b\u043e\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e Wi-Fi<\/td><td>\u0414\u0430<\/td><\/tr><tr><td>One-time \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435<\/td><td>\u0414\u0430<\/td><\/tr><tr><td>\u0422\u043e\u0447\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f<\/td><td>\u041b\u0443\u0447\u0448\u0435 AlarmManager<\/td><\/tr><tr><td>\u0420\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (\u043c\u0435\u0434\u0438\u0430, \u0448\u0430\u0433\u043e\u043c\u0435\u0440 \u0438 \u0442.\u043f.)<\/td><td>ForegroundService<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c?<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>WorkManager<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442:\n<ul class=\"wp-block-list\">\n<li><code>JobScheduler<\/code> (\u043d\u0430 API 23+)<\/li>\n\n\n\n<li><code>AlarmManager<\/code> + <code>BroadcastReceiver<\/code> (\u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0440\u044b\u0445)<\/li>\n\n\n\n<li><code>FirebaseJobDispatcher<\/code> (\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0432 \u0441\u0442\u0430\u0440\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u0412\u0441\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0411\u0414 (\u043e\u0431\u044b\u0447\u043d\u043e Room), \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0436\u0438\u0442\u044c:\n<ul class=\"wp-block-list\">\n<li>\u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/li>\n\n\n\n<li>\u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/li>\n\n\n\n<li>\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u0412 <code>doWork()<\/code> \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c UI, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c API, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0432 \u0411\u0414, \u0438 \u0442.\u0434.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u041e\u0442\u0432\u0435\u0442: WorkManager \u2014 \u044d\u0442\u043e API \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u043e\u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435: \u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c WorkManager? \u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c WorkManager? \u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0414\u0430 \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043b\u043e\u0433\u043e\u0432 \/ \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043d\u043e\u0447\u044c\u044e \u0414\u0430 \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u0435\u0434\u0438\u0430\u0444\u0430\u0439\u043b\u043e\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e Wi-Fi \u0414\u0430 One-time \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0414\u0430 \u0422\u043e\u0447\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u041b\u0443\u0447\u0448\u0435 AlarmManager \u0420\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (\u043c\u0435\u0434\u0438\u0430, \u0448\u0430\u0433\u043e\u043c\u0435\u0440 \u0438 \u0442.\u043f.) ForegroundService \u041a\u0430\u043a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-834","post","type-post","status-publish","format-standard","hentry","category-android"],"_links":{"self":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts\/834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=834"}],"version-history":[{"count":1,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts\/834\/revisions"}],"predecessor-version":[{"id":835,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts\/834\/revisions\/835"}],"wp:attachment":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}