{"id":265373,"date":"2015-09-10T15:37:02","date_gmt":"2015-09-10T11:37:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=265373"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=265373","title":{"rendered":"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0440\u0435\u0430\u043b\u0442\u0430\u0439\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u043d\u043b\u0430\u0439\u043d \u044e\u0437\u0435\u0440\u043e\u0432 (Parse.com + Pubnub)"},"content":{"rendered":"<p>       \u041a\u0430\u043a-\u0442\u043e \u0440\u0430\u0437 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043c\u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u0437\u0430\u0434\u0430\u0447\u0443 \u0434\u043b\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438: \u043d\u0430\u043f\u0438\u0448\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 \u043b\u043e\u0433\u0438\u043d\u0430\/\u0440\u0430\u0437\u043b\u043e\u0433\u0438\u043d\u0430 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u043d\u043b\u0430\u0439\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u00ab\u0436\u0438\u0442\u044c\u00bb \u0442\u043e\u043b\u044c\u043a\u043e 30 \u0441\u0435\u043a\u0443\u043d\u0434. \u041a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u0432\u0430\u0435\u0442, \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b: \u0445\u0430, \u0447\u0442\u043e \u0442\u0443\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e? \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u044e\u0437\u0435\u0440\u043e\u0432, \u0430 \u0434\u0430\u043b\u044c\u0448\u0435 \u0434\u0435\u043b\u043e \u0437\u0430 \u043c\u0430\u043b\u044b\u043c\u2026 \u043d\u043e \u043d\u0435 \u0442\u0443\u0442 \u0442\u043e \u0431\u044b\u043b\u043e.<\/p>\n<p>  \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0431\u044d\u043a\u044d\u043d\u0434\u0430 \u043d\u0430 Parse.com \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f, \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 Pubnub, \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0451 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u043e\u0434 Android.<\/p>\n<p>  \u0422\u043e, \u0447\u0442\u043e \u0432\u044b\u0448\u043b\u043e \u0432 \u0438\u0442\u043e\u0433\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/Nexen23\/I_am_here\/dev\/app\/Demos\/I_am_here_SMALL.gif\" alt=\"\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f\"\/><br \/>  <a name=\"habracut\"><\/a><br \/>  \u0421\u0442\u0440\u043e\u0433\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0442\u0435\u043c\u043e\u0439 \u0441\u0432\u044f\u0437\u043a\u0438 Parse.com \u0438 Pubnub \u0443\u0436\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/198864\/\">\u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0437\u0434\u0435\u0441\u044c \u044f \u0445\u043e\u0447\u0443 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u043c \u043a\u043e\u0434\u0435 Parse.com, \u0434\u0430 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0434 Android, \u0430 \u043d\u0435 IOS.<\/p>\n<h4>Parse.com<\/h4>\n<p>  <a href=\"https:\/\/parse.com\/\">Parse.com<\/a> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0431\u0448\u0438\u0440\u043d\u044b\u0439 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b: \u0442\u0443\u0442 \u0438 \u0411\u0414 \u0432 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u0435\u0440\u0442\u043a\u0435, \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434, \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430, \u0438 \u0434\u0430\u0436\u0435 \u043f\u0443\u0448-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f! \u0418 \u0432\u0441\u0451 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u0442\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u0448\u044c \u043f\u043e\u0440\u043e\u0433 \u0432 <a href=\"https:\/\/parse.com\/plans\">30 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, 20\u0413\u0411 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0438 \u0442.\u0434.<\/a>. \u041c\u0435\u043d\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438 (it&#8217;s free!), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441.<\/p>\n<h5>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/h5>\n<p>  \u0422\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0448\u0442\u0440\u0443\u0434\u0438\u0440\u043e\u0432\u0430\u0432 <a href=\"https:\/\/parse.com\/docs\/android\/guide\">\u0433\u0438\u0434<\/a>, \u0432\u0441\u043f\u043b\u044b\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u043d\u043d\u043e \u0441 <i>\u0440\u0435\u0430\u043b\u0442\u0430\u0439\u043c\u043e\u043c<\/i> \u0441\u043f\u0438\u0441\u043a\u0430 \u043e\u043d\u043b\u0430\u0439\u043d \u044e\u0437\u0435\u0440\u043e\u0432 \u0438 \u0438\u0445 <u>\u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0436\u0438\u0437\u043d\u0438<\/u>:  <\/p>\n<ol>\n<li>\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u043b\u044f \u0442\u0438\u043f\u0430 Timer \u0434\u043b\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/li>\n<li>\u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 <a href=\"http:\/\/javascript.ru\/ajax\/comet\/long-poll\">\u043b\u043e\u043d\u0433-\u043f\u0443\u043b\u043b\u0438\u043d\u0433\u0430<\/a> (\u043b\u0438\u0431\u043e \u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b)<\/li>\n<li>\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 User\/Session \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438<\/li>\n<\/ol>\n<p>  <\/p>\n<h5>\u0420\u0435\u0448\u0435\u043d\u0438\u044f<\/h5>\n<p>  \u041f\u043e\u044f\u0441\u043d\u044e, \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<br \/>  \u0422\u0438\u043f Timer (\u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430 \u0442\u043e\u0433\u043e) \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u043e\u043b\u0435 expireAt, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f (\u0432 \u0438\u0434\u0435\u0430\u043b\u0435, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c) \u043e \u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u044e\u0437\u0435\u0440 \u00ab\u0443\u043c\u0438\u0440\u0430\u0435\u0442\u00bb.<\/p>\n<p>  \u0417\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0438\u043f Date \u0438 \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u043b\u0435\u0434\u0438\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u044e\u0437\u0435\u0440\u0430 \u043d\u0443\u0436\u043d\u043e \u00ab\u0443\u0431\u0438\u0442\u044c\u00bb.<\/p>\n<p>  \u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430 \u043b\u043e\u043d\u0433-\u043f\u0443\u043b\u043b\u0438\u043d\u0433 \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445\/\u0443\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u044e\u0437\u0435\u0440\u043e\u0432, \u043e\u0434\u043d\u0430\u043a\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438. <\/p>\n<p>  \u0411\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/parse.com\/docs\/android\/guide#push-notifications-using-channels\">\u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438<\/a>. \u0412\u043a\u0440\u0430\u0442\u0446\u0435, \u044d\u0442\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u0430\u043d\u0430\u043b\u044b \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u043a\u0435\u043c \u0443\u0433\u043e\u0434\u043d\u043e (\u0441\u0435\u0440\u0432\u0435\u0440-\u043a\u043b\u0438\u0435\u043d\u0442, \u043a\u043b\u0438\u0435\u043d\u0442-\u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u0442.\u0434.). \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u0441\u043b\u0435 \u043b\u043e\u0433\u0438\u043d\u0430\/\u0440\u0430\u0437\u043b\u043e\u0433\u0438\u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u043d\u0430\u043b, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u043e\u0448\u0435\u043b\/\u0432\u044b\u0448\u0435\u043b. \u042d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0430\u043b\u0442\u0430\u0439\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. (\u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0442\u0430\u043a, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u043e\u0437\u0436\u0435).<\/p>\n<p>  \u0412 SDK Parse.com \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043c\u0435\u0442\u043e\u0434\u044b \u043b\u043e\u0433\u0438\u043d\u0430\/\u0440\u0430\u0437\u043b\u043e\u0433\u0438\u043d\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0431\u044b \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u044d\u0442\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c.<\/p>\n<p>  \u041a\u0430\u043a \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u044b\u0448\u0435, \u043f\u0440\u0438 \u043b\u043e\u0433\u0438\u043d\u0435\/\u0440\u0430\u0437\u043b\u043e\u0433\u0438\u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u043a\u0430\u043d\u0430\u043b \u043e \u0442\u043e\u043c, \u00ab\u0436\u0438\u0432\u00bb \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c (\u0438\u043b\u0438 \u00ab\u043c\u0435\u0440\u0442\u0432\u00bb, \u0435\u0441\u043b\u0438 \u043e\u043d \u0440\u0430\u0437\u043b\u043e\u0433\u0438\u043d\u0438\u043b\u0441\u044f). \u0421\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, AfterSave, beforeDelete \u0438 \u0442.\u0434. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u0442 \u0442\u0430\u043a\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0434\u043b\u044f Session. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0440\u0430\u0437\u043b\u043e\u0433\u0438\u043d\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043f\u0440\u044f\u043c\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u044e\u0437\u0435\u0440\u0430 \u0441 \u0435\u0433\u043e \u0441\u0435\u0441\u0441\u0438\u0435\u0439, \u0447\u0442\u043e \u0441\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u043d\u0435\u0442 \u0432\u0441\u0451 \u043f\u0440\u0438\u0435\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0432 SDK \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 IMH_Session, \u043d\u0430\u0432\u0435\u0441\u0438\u0432 \u043d\u0430 \u043d\u0435\u0433\u043e \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b afterDelete \u0438 afterSave, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0441\u044b\u043b\u043a\u0430 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b.<\/p>\n<h5>\u041d\u044e\u0430\u043d\u0441\u044b<\/h5>\n<p>  \u0418 \u0442\u0443\u0442 \u0431\u044b \u043f\u043e\u0440\u0430 \u043f\u0440\u0430\u0437\u0434\u043d\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u0431\u0435\u0434\u043d\u043e \u0441\u0430\u0434\u0438\u0442\u044c\u0441\u044f \u0437\u0430 Android Studio, \u043d\u043e\u2026 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 \u043f\u0443\u0448-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f\u0445. \u041f\u043e\u044f\u0441\u043d\u044e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e, \u043a\u0430\u043a \u0438 \u044f, \u0432 \u0442\u0430\u043d\u043a\u0435. \u041f\u0443\u0448-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044e\u0442 \u043d\u0438\u0447\u0435\u0433\u043e. \u041e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 Fire&#038;Forget, \u0442\u043e \u0435\u0441\u0442\u044c, \u043f\u043e\u0441\u043b\u0430\u0432 \u043f\u0443\u0448-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435, \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u043e <b>\u0434\u043e\u0448\u043b\u043e<\/b> \u0434\u043e \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0430. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u0441\u043a\u0430\u0437\u0430\u0442\u044c <b>\u043a\u043e\u0433\u0434\u0430<\/b> \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e!<\/p>\n<p>  \u0422\u0430\u043a \u0447\u0442\u043e \u043d\u0438 \u043e \u043a\u0430\u043a\u043e\u043c \u0440\u0435\u0430\u043b\u0442\u0430\u0439\u043c\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u0432\u0441\u0442\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0444\u043b\u0443\u0434\u043e\u043c \u0432 \u043a\u0430\u043d\u0430\u043b\u0435. \u0418\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438 \u0440\u0430\u0432\u043d\u043e\u043f\u0440\u0430\u0432\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u044e\u0431\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0448\u044c \u0441\u043b\u0430\u0442\u044c \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e, \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043c\u0443\u0441\u043e\u0440\u0430 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u0418 \u0442\u043e \u043d\u0435 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u043e\u043d\u0438 \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412\u0441\u0442\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0441\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u044e\u0437\u0435\u0440\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0445\u0430\u043e\u0441\u0443 \u0438 \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 30 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0431\u044b\u0441\u0442\u0440\u043e \u043a\u043e\u043d\u0447\u0430\u0442\u0441\u044f.<\/p>\n<h4>Pubnub<\/h4>\n<p>  \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0432\u0441\u044e \u043f\u043b\u0430\u0447\u0435\u0432\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0432\u044b\u0445\u043e\u0434 \u0431\u044b\u043b \u043d\u0430\u0439\u0434\u0435\u043d. \u042d\u0442\u0438\u043c \u0432\u044b\u0445\u043e\u0434\u043e\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f <a href=\"http:\/\/www.pubnub.com\/\">Pubnub<\/a>. \u0412\u043e\u043e\u0431\u0449\u0435, \u044d\u0442\u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 SDK \u0434\u043b\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u0447\u0430\u0442\u0430, \u043d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, <a href=\"http:\/\/www.pubnub.com\/pricing\/\">\u043e\u043d\u043e \u043f\u043b\u0430\u0442\u043d\u043e \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u0434\u0434\u043e\u043d\u043e\u043c<\/a>.<\/p>\n<p>  \u0421\u0430\u043c \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0451 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0442\u0430\u0439\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041d\u043e \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u043e \u2014 \u0448\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0442\u0430\u0439\u043c \u043a\u0430\u043d\u0430\u043b\u044b. \u041e\u043d\u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b, \u043f\u0440\u043e\u0441\u0442\u044b \u0432 \u0438\u0441\u0442\u043e\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0438, \u0447\u0442\u043e, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430! \u041a\u0430\u043a \u0440\u0430\u0437 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>  \u0420\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0434\u0432\u0443\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u0430\u043c: publish_key \u0438 subscribe_key. \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c, \u043f\u0435\u0440\u0432\u044b\u0439 \u043a\u043b\u044e\u0447 \u0443\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u0430 \u0432\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u043c \u043a\u043b\u044e\u0447 \u0432 \u0441\u0435\u043a\u0440\u0435\u0442\u0435, \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u0441\u043f\u0430\u043c\u0438\u0442 \u043a\u0430\u043d\u0430\u043b \u0438 \u043b\u044e\u0431\u043e\u043c\u0443 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0432 \u043d\u0451\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0432\u0435\u0440\u0438\u0442\u044c. \u0418\u0434\u0435\u0430\u043b\u044c\u043d\u043e!<\/p>\n<p>  <s>p.s. \u042f \u043f\u0438\u0448\u0443 Parse.com, \u043d\u043e Pubnub (\u0431\u0435\u0437 `.com`) \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u043d\u0435 \u0442\u0430\u043a \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u0435\u0435. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u044d\u0442\u043e \u043d\u0438\u043a\u043e\u043c\u0443 \u043d\u0435 \u0440\u0435\u0436\u0435\u0442 \u0433\u043b\u0430\u0437.<\/s><\/p>\n<h4>\u0411\u044d\u043a\u044d\u043d\u0434 \u2014 Parse.com<\/h4>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 API \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u0438\u0434\u0435\u044f \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 \u0442\u0430\u043a\u043e\u0432\u0430:  <\/p>\n<ol>\n<li>\u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 (\u0447\u0435\u0440\u0435\u0437 API) login()<\/li>\n<li>Parse.com cloud code<\/li>\n<li>\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044e\u0437\u0435\u0440\u0430 \u0432 \u0411\u0414<\/li>\n<li>\u0442\u0440\u0438\u0433\u0433\u0435\u0440 afterSave(), \u043e\u043f\u043e\u0432\u0435\u0449\u0430\u044e\u0449\u0438\u0439 Pubnub \u043a\u0430\u043d\u0430\u043b \u043e \u043b\u043e\u0433\u0438\u043d\u0435 \u044e\u0437\u0435\u0440\u0430<\/li>\n<li>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 login()<\/li>\n<\/ol>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 API:  <\/p>\n<ul>\n<li>Login<\/li>\n<li>Logout<\/li>\n<li>GetOnlineUsers<\/li>\n<li>GetNow<\/li>\n<\/ul>\n<p>  \u041f\u043e\u044f\u0441\u043d\u044e \u043d\u0430\u0441\u0447\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e. \u042f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u043c. \u0421\u0430\u043c API \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b, \u043d\u043e \u0432\u043e\u0442 \u0434\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0442\u0430\u043a \u0440\u0443\u043a\u0438 \u0438 \u043d\u0435 \u0434\u043e\u0448\u043b\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0430\u043c\u043e API \u044f \u0440\u0435\u0448\u0438\u043b \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>  \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 \u0437\u0430\u043f\u0430\u0445 \u043a\u043e\u0434\u0430. \u041d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 js-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. \u0423\u0447\u0442\u0443 \u043b\u044e\u0431\u044b\u0435 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f \u043f\u043e \u0435\u0433\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">\/*global Parse:false, $:false, jQuery:false *\/  \/\/ Importas var _ = require('underscore'); \/\/ jshint ignore:line var moment = require('moment'); \/\/ jshint ignore:line  \/\/ Constants var sessionObjName = &quot;IMH_Session&quot;; var sessionLifetimeSec = 13;  var channelName = &quot;events&quot;; var publishKey = &quot;pub-c-6271f363-519a-432d-9059-e65a7203ce0e&quot;,     subscribeKey = &quot;sub-c-a3d06db8-410b-11e5-8bf2-0619f8945a4f&quot;,     httpRequestUrl = 'http:\/\/pubsub.pubnub.com\/publish\/' + publishKey + '\/' + subscribeKey + '\/0\/' + channelName + '\/0\/';   \/\/ Utils function Log(obj, tag) {     &quot;use strict&quot;;      var loggingString = &quot;Cloud_code: &quot;;     if (tag != null) { \/\/ jshint ignore:line         loggingString += &quot;[&quot; + tag + &quot;] &quot;;     }     loggingString += JSON.stringify(obj) + &quot;\\n&quot;;      console.log(loggingString); \/\/ jshint ignore:line }  function GetNow() {     &quot;use strict&quot;;     return moment.utc(); }  \/\/ Supporting var baseSession = {udid: &quot;&quot;, loginedAt: GetNow(), aliveTo: GetNow()};  var errorHandler = function(error) {     &quot;use strict&quot;;     Log(error.message, &quot;error&quot;); };  function DeleteSession(obj) { \tobj.set(&quot;loginedAt&quot;, obj.get(&quot;aliveTo&quot;)); \tSendEvent(obj);      obj.destroy(); }  function DeleteDeadSessions() {     &quot;use strict&quot;;      var query = new Parse.Query(sessionObjName); \/\/ jshint ignore:line     var promise = query.lessThanOrEqualTo(&quot;aliveTo&quot;, GetNow().toDate())         .each(function(obj)          {              Log(obj, &quot;Delete dead session&quot;); \t\t\t DeleteSession(obj);          }     ); \treturn promise; }  function NewSession(udid) {     &quot;use strict&quot;;      var session = _.clone(baseSession);     session.udid = udid;     session.loginedAt = GetNow();     session.aliveTo = GetNow().add({seconds: sessionLifetimeSec});      return session; }  function GetSessionQuery() {     &quot;use strict&quot;;     var objConstructor = Parse.Object.extend(sessionObjName); \/\/ jshint ignore:line \tvar query = new Parse.Query(objConstructor);     \/\/query.select(&quot;udid&quot;, &quot;loginedAt&quot;, &quot;aliveTo&quot;); \/\/not work for some reason \treturn query; }  function IsUserOnline(udid, onUserOnlineHanlder, onUserOfflineHanlder, onError) { \t&quot;use strict&quot;;  \tvar userAlive = false; \tvar query = GetSessionQuery(); \tquery.equalTo(&quot;udid&quot;, udid).greaterThanOrEqualTo(&quot;aliveTo&quot;, GetNow().toDate()); \tquery.find({ \t\tsuccess: function(result) \t\t{ \t\t\tif (result.length == 0) { \t\t\t\tonUserOfflineHanlder(); \t\t\t} \t\t\telse { \t\t\t\tonUserOnlineHanlder(result); \t\t\t} \t\t}, \t\terror: onError \t}); }  function NewParseSession(session) {     &quot;use strict&quot;;      var objConstructor = Parse.Object.extend(sessionObjName); \/\/ jshint ignore:line     var obj = new objConstructor();      obj.set({         udid: session.udid,         loginedAt: session.loginedAt.toDate(),         aliveTo: session.aliveTo.toDate()         }     );      return obj; }  function SendEvent(session) {     &quot;use strict&quot;;      Parse.Cloud.httpRequest({ \/\/ jshint ignore:line         url: httpRequestUrl + JSON.stringify(session),          success: function(httpResponse) {},         error: function(httpResponse) {             Log('Request failed with response code ' + httpResponse.status);         }     }); }  \/\/ API functions var API_GetNow = function(request, response) {     &quot;use strict&quot;;  \tvar onUserOnline = function(result) { \t\tresponse.success( GetNow().toDate() ); \t};  \tvar onUserOffline = function(error) { \t\tresponse.error(error); \t};  \tvar onError = function(error) { \t\tresponse.error(error); \t};  \tIsUserOnline(request.params.udid, onUserOnline, onUserOffline, onError); };  var API_GetOnlineUsers = function(request, response) {     &quot;use strict&quot;;  \tvar onUserOnline = function(result) { \t\tvar query = GetSessionQuery() \t\t    .addDescending(&quot;aliveTo&quot;); \t\tquery.find({ \t\t\tsuccess: function(result) \t\t\t{ \t\t\t\tresponse.success( JSON.stringify(result) ); \t\t\t}, \t\t\terror: errorHandler \t\t}); \t};  \tvar onUserOffline = function(error) { \t\tresponse.error(error); \t};  \tvar onError = function(error) { \t\tresponse.error(error); \t};      DeleteDeadSessions().always( function() { \t    IsUserOnline(request.params.udid, onUserOnline, onUserOffline, onError);     }); };  var API_Login = function(request, response) {     &quot;use strict&quot;;      var userUdid = request.params.udid;     var session = NewSession(userUdid);     var parseObject = NewParseSession(session);  \tParse.Cloud.run(&quot;Logout&quot;, {udid: userUdid}).always( function() { \t\tparseObject.save(null, { \t\t\tsuccess: function(obj) { \t\t\t\tLog(obj, &quot;Login:save&quot;); \t\t\t\tresponse.success( JSON.stringify(parseObject) ); \t\t\t}, \t\t\terror: function(error) { \t\t\t\terrorHandler(error); \t\t\t\tresponse.error(error); \t\t\t} \t\t}); \t}); };  var API_Logout = function(request, response) {     &quot;use strict&quot;;      var userUdid = request.params.udid;     var query = GetSessionQuery()         .equalTo(&quot;udid&quot;, userUdid);      query.each( function(obj) {         Log(obj, &quot;Logout:destroy&quot;); \t\tDeleteSession(obj);     }).done( function() {response.success();} ); };   \/\/ Bindings Parse.Cloud.afterSave(sessionObjName, function(request) { \/\/ jshint ignore:line     &quot;use strict&quot;;  \tSendEvent(request.object); });  \/\/ API definitions Parse.Cloud.define(&quot;GetNow&quot;, API_GetNow); \/\/ jshint ignore:line  Parse.Cloud.define(&quot;GetOnlineUsers&quot;, API_GetOnlineUsers); \/\/ jshint ignore:line  Parse.Cloud.define(&quot;Login&quot;, API_Login); \/\/ jshint ignore:line Parse.Cloud.define(&quot;Logout&quot;, API_Logout); \/\/ jshint ignore:line <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u044f \u043e\u0431\u043e\u0448\u0435\u043b\u0441\u044f \u0431\u0435\u0437 afterDelete() \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441 afterDelete() \u0443 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u0433\u043e\u043d\u043a\u0438. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0432\u044b\u0448\u0435\u0434\u0448\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u0435\u0439\u0447\u0430\u0441 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u0441\u043a\u043e\u0440\u043e \u043f\u043e\u0448\u043b\u0435\u0442 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u043a\u0430\u043d\u0430\u043b. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043e\u043d \u0432 \u0442\u0443 \u0436\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0441\u043d\u043e\u0432\u0430. <br \/>  \u0412 \u0438\u0442\u043e\u0433\u0435, \u0432 \u043a\u0430\u043d\u0430\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u043e \u043d\u0435\u0447\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u00ab\u0425 \u0437\u0430\u0448\u0435\u043b\u00bb, \u00ab\u0425 \u0437\u0430\u0448\u0435\u043b\u00bb, \u00ab\u0425 \u0432\u044b\u0448\u0435\u043b\u00bb. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0435 \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445. \u0418\u0437-\u0437\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0431\u044b\u0432\u0430\u043b\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u044e\u0437\u0435\u0440 \u0435\u0449\u0451 \u00ab\u0436\u0438\u0432\u00bb \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u043e\u043b\u044c\u043a\u043e-\u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0448\u0435\u043b, \u043d\u043e \u0432 \u043e\u043d\u043b\u0430\u0439\u043d \u0441\u043f\u0438\u0441\u043a\u0435 \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f, \u0432\u0435\u0434\u044c \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043d\u0430\u043b\u0443, \u0442\u043e \u043e\u043d \u00ab\u043c\u0435\u0440\u0442\u0432\u00bb.<\/p>\n<h5>\u0411\u043e\u043b\u044c\u0448\u0435 \u043d\u044e\u0430\u043d\u0441\u043e\u0432!<\/h5>\n<p>  \u041a\u0430\u043a \u043e\u0442\u043c\u0435\u0447\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435, Parse.com \u0432\u044b\u043d\u0443\u0436\u0434\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Date, \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c Timer&#8217;\u0430 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 expireAt (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, aliveTo). \u041d\u043e \u0432\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u2014 \u0430 \u043a\u043e\u0433\u0434\u0430 \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432\u0441\u0435\u0445 \u044e\u0437\u0435\u0440\u043e\u0432 \u043d\u0430 \u0442\u043e, \u00ab\u0436\u0438\u0432\u044b\u00bb \u043b\u0438 \u043e\u043d\u0438 \u0438\u043b\u0438 \u0443\u0436\u0435 \u00ab\u043c\u0435\u0440\u0442\u0432\u044b\u00bb?<\/p>\n<p>  \u041e\u0434\u043d\u043e \u0438\u0437 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/parse.com\/docs\/android\/guide#cloud-code-advanced-background-jobs\">Job<\/a> \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043a\u0430\u0436\u0434\u044b\u0435 5-10 \u0441\u0435\u043a\u0443\u043d\u0434. \u041d\u043e \u0441\u0442\u0440\u043e\u0433\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0440\u0435\u0430\u043b\u0442\u0430\u0439\u043c. \u042f \u0445\u043e\u0442\u0435\u043b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u00ab\u0443\u043c\u0438\u0440\u0430\u043b\u0438\u00bb \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e, \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0431\u044d\u043a\u0433\u0440\u0430\u0443\u0434-Job&#8217;\u044b (\u043a\u0441\u0442\u0430\u0442\u0438, \u0443 \u043d\u0435\u0451 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u2014 15 \u043c\u0438\u043d\u0443\u0442. \u0422\u0430\u043a \u0447\u0442\u043e \u0435\u0451 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0438\u043d\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434.<\/p>\n<p>  \u041a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0436\u0438\u0437\u043d\u044c \u044e\u0437\u0435\u0440\u0430:<\/p>\n<p>  Login -&gt; GetOnlineUsers -&gt; Logout <\/p>\n<p>  \u0438\u043b\u0438<\/p>\n<p>  Login -&gt; GetOnlineUsers -&gt; \u0441\u0432\u0435\u0440\u043d\u0443\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u0435\u0441\u0442\u044c, \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u043a\u0430\u043d\u0430\u043b\u0435 -&gt; GetOnlineUsers -&gt; Logout<\/p>\n<p>  \u0411\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u00ab\u043c\u0435\u0440\u0442\u0432\u044b\u0445\u00bb \u044e\u0437\u0435\u0440\u043e\u0432 \u0432 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 GetOnlineUsers. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e, \u043f\u043e \u0444\u0430\u043a\u0442\u0443, \u0432 \u0411\u0414 \u043c\u043e\u0433\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u00ab\u043c\u0435\u0440\u0442\u0432\u044b\u0435\u00bb \u044e\u0437\u0435\u0440\u044b \u0445\u043e\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043b\u0433\u043e \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u00ab\u0436\u0438\u0432\u044b\u0445\u00bb. \u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443\u0434\u0430\u043b\u044f\u0442\u0441\u044f \u0432\u0441\u0435 \u043c\u0435\u0440\u0442\u0432\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 (\u0432 \u043b\u0443\u0447\u0448\u0438\u0445 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u044f\u0445 \u043b\u0435\u043d\u0438\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439).<\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0437\u0430 \u00ab\u0436\u0438\u0437\u043d\u044c\u044e\u00bb \u044e\u0437\u0435\u0440\u043e\u0432 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435. \u041e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u043a\u0430\u043d\u0430\u043b\u0435 \u043e \u0441\u043c\u0435\u0440\u0442\u0438 \u044e\u0437\u0435\u0440\u0430 \u043f\u0440\u0438\u0434\u0451\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d \u0440\u0430\u0437\u043b\u043e\u0433\u0438\u043d\u0438\u043b\u0441\u044f \u0441\u0430\u043c. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u044e\u0437\u0435\u0440 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0436\u0438\u0432\u044b\u043c \u0432\u0435\u0447\u043d\u043e.<\/p>\n<h4>Android<\/h4>\n<p>  <\/p>\n<h5>Pubnub<\/h5>\n<p>  Pubnub SDK, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u0435\u0433\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c, \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u044b\u043b\u0430 \u0441\u0434\u0435\u043b\u0430\u043d\u0430 \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 Pubnub, \u0447\u0442\u043e\u0431\u044b, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0431\u0435\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 Pubnub &#8212; Channel<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class PubnubChannel extends Channel { \tstatic private final String CHANNEL_NAME = &quot;events&quot;; \tstatic private final String SUBSCRIBE_KEY = &quot;sub-c-a3d06db8-410b-11e5-8bf2-0619f8945a4f&quot;;  \tPubnub pubnub = new Pubnub(&quot;&quot;, SUBSCRIBE_KEY); \tCallback pubnubCallback = new Callback() { \t\t@Override \t\tpublic void connectCallback(String channel, Object message) { \t\t\tif (listener != null) { \t\t\t\tlistener.onConnect(channel, &quot;Connected: &quot; + message.toString()); \t\t\t} \t\t}  \t\t@Override \t\tpublic void disconnectCallback(String channel, Object message) { \t\t\tif (listener != null) { \t\t\t\tlistener.onDisconnect(channel, &quot;Disconnected: &quot; + message.toString()); \t\t\t} \t\t}  \t\t@Override \t\tpublic void reconnectCallback(String channel, Object message) { \t\t\tif (listener != null) { \t\t\t\tlistener.onReconnect(channel, &quot;Reconnected: &quot; + message.toString()); \t\t\t} \t\t}  \t\t@Override \t\tpublic void successCallback(String channel, Object message, String timetoken) { \t\t\tif (listener != null) { \t\t\t\tlistener.onMessageRecieve(channel, message.toString(), timetoken); \t\t\t} \t\t}  \t\t@Override \t\tpublic void errorCallback(String channel, PubnubError error) { \t\t\tif (listener != null) { \t\t\t\tlistener.onErrorOccur(channel, &quot;Error occured: &quot; + error.toString()); \t\t\t} \t\t} \t};  \tpublic PubnubChannel() { \t\tsetName(CHANNEL_NAME); \t}  \t@Override \tpublic void subscribe() throws ChannelException { \t\ttry { \t\t\tpubnub.subscribe(CHANNEL_NAME, pubnubCallback); \t\t} catch (PubnubException e) { \t\t\te.printStackTrace(); \t\t\tthrow new ChannelException(ChannelException.CONNECT_ERROR, e); \t\t} \t}  \t@Override \tpublic void unsubscribe() { \t\tpubnub.unsubscribeAll(); \t} } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0431\u044b\u043b\u0430 \u0441\u0434\u0435\u043b\u0430\u043d\u0430 \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 \u043e\u0431\u0451\u0440\u0435\u0442\u043a\u043e\u0439 (\u0434\u0430-\u0434\u0430), \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u043a\u0430\u043d\u0430\u043b\u0435, \u0430 \u043a\u043e\u043d\u0442\u0440\u0435\u0442\u043d\u044b\u0445 \u044e\u0437\u0435\u0440\u043e\u0432:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0431\u0435\u0440\u0442\u043a\u0430 \u043d\u0430 Channel &#8212; ServerChannel<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class ServerChannel { \tLogger l = LoggerFactory.getLogger(ServerChannel.class);  \tJsonParser jsonParser; \tChannel serverChannel;  \tServerChannel.EventListener listener; \tprivate final Channel.EventListener listenerAdapter = new Channel.EventListener() { \t\t@Override \t\tpublic void onConnect(String channel, String greeting) {  \t\t}  \t\t@Override \t\tpublic void onDisconnect(String channel, String reason) { \t\t\tif (listener != null) { \t\t\t\tlistener.onDisconnect(reason); \t\t\t} \t\t}  \t\t@Override \t\tpublic void onReconnect(String channel, String reason) {  \t\t}  \t\t@Override \t\tpublic void onMessageRecieve(String channel, String message, String timetoken) { \t\t\tif (listener != null) { \t\t\t\tServerChannel.this.onMessageRecieve(message, timetoken); \t\t\t} \t\t}  \t\t@Override \t\tpublic void onErrorOccur(String channel, String error) { \t\t\tl.warn(String.format(&quot;%s : [error] %s&quot;, channel, error)); \t\t\tif (listener != null) { \t\t\t\tServerChannel.this.unsubscribe(); \t\t\t} \t\t} \t};  \tpublic ServerChannel(Channel serverChannel, JsonParser jsonParser) { \t\tthis.serverChannel = serverChannel; \t\tthis.jsonParser = jsonParser; \t}  \tpublic final void setListener(@NonNull ServerChannel.EventListener listener) { \t\tthis.listener = listener; \t}  \tpublic final void clearListener() { \t\tlistener = null; \t}  \tpublic final void subscribe() throws ChannelException { \t\ttry { \t\t\tserverChannel.setListener(listenerAdapter); \t\t\tserverChannel.subscribe(); \t\t} catch (ChannelException e) { \t\t\te.printStackTrace(); \t\t\tserverChannel.clearListener(); \t\t\tthrow e; \t\t} \t} \tpublic final void unsubscribe() { \t\tserverChannel.unsubscribe(); \t\tserverChannel.clearListener(); \t}  \tpublic void onMessageRecieve(String userJson, String timetoken) { \t\tDyingUser dyingUser = jsonParser.fromJson(userJson, DyingUser.class); \t\tif (dyingUser != null) { \t\t\tif (dyingUser.isAlive()) { \t\t\t\tlistener.onUserLogin(dyingUser); \t\t\t} else { \t\t\t\tlistener.onUserLogout(dyingUser); \t\t\t} \t\t} \t}  \tpublic interface EventListener { \t\tvoid onDisconnect(String reason); \t\tvoid onUserLogin(DyingUser dyingUser); \t\tvoid onUserLogout(DyingUser dyingUser); \t} } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h5>Parse.com<\/h5>\n<p>  \u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e. \u0412\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0412\u0441\u0451, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API \u0438 \u043f\u0430\u0440\u0441\u0438\u0442\u044c json \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u044b.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">AuthApi<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class AuthApi extends Api { \tstatic final String \t\t\tAPI_Login = &quot;Login&quot;, \t\t\tAPI_Logout = &quot;Logout&quot;;  \t@Inject \tpublic AuthApi(JsonParser parser) { \t\tsuper(parser); \t}  \tpublic DyingUser login(@NonNull final String udid) throws ApiException { \t\tDyingUser dyingUser; \t\ttry { \t\t\tString jsonObject = ParseCloud.callFunction(API_Login, constructRequestForUser(udid)); \t\t\tdyingUser = parser.fromJson(jsonObject, DyingUser.class); \t\t} catch (ParseException e) { \t\t\te.printStackTrace(); \t\t\tthrow new ApiException(ApiException.LOGIN_ERROR, e); \t\t} \t\treturn dyingUser; \t}  \tpublic void logout(@NonNull final DyingUser dyingUser) { \t\ttry { \t\t\tParseCloud.callFunction(API_Logout, constructRequestForUser(dyingUser.getUdid())); \t\t} catch (ParseException e) { \t\t\te.printStackTrace(); \t\t} \t} } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">UserApi<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class UserApi extends Api { \tstatic final String \t\t\tAPI_GetOnlineUsers = &quot;GetOnlineUsers&quot;;  \t@Inject \tpublic UserApi(JsonParser parser) { \t\tsuper(parser); \t}  \tpublic final ArrayList&lt;DyingUser&gt; getOnlineUsers(@NonNull final DyingUser dyingUser) throws ApiException { \t\tArrayList&lt;DyingUser&gt; users; \t\ttry { \t\t\tString jsonUsers = ParseCloud.callFunction(API_GetOnlineUsers, constructRequestForUser(dyingUser.getUdid())); \t\t\tusers = parser.fromJson(jsonUsers, new TypeToken&lt;List&lt;DyingUser&gt;&gt;(){}.getType()); \t\t} catch (ParseException e) { \t\t\te.printStackTrace(); \t\t\tthrow new ApiException(ApiException.GET_USERS_ERROR, e); \t\t} \t\treturn users; \t} } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041d\u0443 \u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Api<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">abstract class Api { \tfinal JsonParser parser;  \tApi(JsonParser parser) { \t\tthis.parser = parser; \t}  \tprotected Map&lt;String, ?&gt; constructRequestForUser(@NonNull final String udid) \t{ \t\tMap&lt;String, String&gt; result = new HashMap&lt;&gt;(); \t\tresult.put(&quot;udid&quot;, udid); \t\treturn result; \t} } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u044b \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043b\u043e\u0433\u0438\u043d\u0443, \u0440\u0430\u0437\u043b\u043e\u0433\u0438\u043d\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044e \u043e\u043d\u043b\u0430\u0439\u043d \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h5>\u0420\u0435\u0430\u043b\u0442\u0430\u0439\u043c<\/h5>\n<p>  <\/p>\n<h6>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 UI<\/h6>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u044e\u0437\u0435\u0440\u044b \u00ab\u0443\u043c\u0438\u0440\u0430\u044e\u0442\u00bb \u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e, \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0445 \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0435\u0441\u044f \u0432\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438. \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445 \u0434\u0430 \u0438 \u0446\u0435\u043b\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0438 \u0440\u0435\u0430\u043b\u0442\u0430\u0439\u043c\u0430, \u0442\u043e \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f UI \u0434\u043e\u043b\u0436\u043d\u043e \u043d\u0435 \u0440\u0435\u0436\u0435, \u0447\u0435\u043c \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u043d \u043a\u043b\u0430\u0441\u0441 TimeTicker, \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 Activity. \u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b Activity \u0432\u043e \u0432\u0440\u0435\u043c\u044f onAttach() \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u043e\u0442 Activity() \u043e\u0431\u044a\u0435\u043a\u0442 TimeTicker (\u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0443\u0436\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 TimeTicker.Owner) \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0435\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">TimeTicker<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class TimeTicker extends Listenable&lt;TimeTicker.EventListener&gt; { \tprivate static final long TICKING_PERIOD_MS_DEFAULT = 1000; \tprivate static final boolean DO_INSTANT_TICK_ON_START_DEFAULT = true; \tlong tickingPeriodMs; \tboolean doInstantTickOnStart;  \tfinal Handler uiHandler = new Handler(Looper.getMainLooper()); \tfinal Timer tickingTimer = new Timer(); \tTimerTask tickingTask;  \tpublic TimeTicker() { \t\tthis(DO_INSTANT_TICK_ON_START_DEFAULT); \t}  \tpublic TimeTicker(boolean doInstantTickOnStart) { \t\tthis.doInstantTickOnStart = doInstantTickOnStart; \t\tsetTickingPeriodMs(TICKING_PERIOD_MS_DEFAULT); \t}  \tpublic void setTickingPeriodMs(final long tickingPeriodMs) { \t\tthis.tickingPeriodMs = tickingPeriodMs; \t}  \tpublic synchronized void start() { \t\tif (tickingTask != null) { \t\t\tstop(); \t\t}  \t\ttickingTask = new TimerTask() { \t\t\t@Override \t\t\tpublic void run() { \t\t\t\tuiHandler.post(new Runnable() { \t\t\t\t\t@Override \t\t\t\t\tpublic void run() { \t\t\t\t\t\tforEachListener(new ListenerExecutor&lt;TimeTicker.EventListener&gt;() { \t\t\t\t\t\t\t@Override \t\t\t\t\t\t\tpublic void run() { \t\t\t\t\t\t\t\tgetListener().onSecondTick(); \t\t\t\t\t\t\t} \t\t\t\t\t\t}); \t\t\t\t\t} \t\t\t\t}); \t\t\t} \t\t};  \t\tlong delay = (doInstantTickOnStart) ? 0 : tickingPeriodMs; \t\ttickingTimer.scheduleAtFixedRate(tickingTask, delay, tickingPeriodMs); \t}  \tpublic synchronized void stop() { \t\tif (tickingTask != null) { \t\t\ttickingTask.cancel(); \t\t} \t\ttickingTask = null; \t\ttickingTimer.purge(); \t}  \tpublic interface EventListener extends Listenable.EventListener { \t\tvoid onSecondTick(); \t}  \tpublic interface Owner { \t\tTimeTicker getTimeTicker(); \t} } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 UI \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0432\u0441\u0451 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0431\u0443\u0434\u0442\u043e \u044e\u0437\u0435\u0440\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0443\u043c\u0438\u0440\u0430\u044e\u0442.<\/p>\n<h6>\u0421\u043f\u0438\u0441\u043e\u043a \u00ab\u0443\u043c\u0438\u0440\u0430\u044e\u0449\u0438\u0445\u00bb \u044e\u0437\u0435\u0440\u043e\u0432<\/h6>\n<p>  \u042d\u0442\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0438\u0437 \u0432\u0441\u0435\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439: \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u044e\u0437\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u00ab\u0443\u043c\u0438\u0440\u0430\u044e\u0442\u00bb. \u0418\u0445 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u043a \u043d\u0443\u043b\u044e, \u0438 \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u044e\u0437\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430.<\/p>\n<p>  \u0421\u0430\u043c\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u2014 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0442\u0430\u0439\u043c\u0435\u0440 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u044e\u0437\u0435\u0440\u0443 \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u00ab\u0441\u043c\u0435\u0440\u0442\u0438\u00bb. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f! \u0412\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0448\u043b\u0430 \u0443 \u043c\u0435\u043d\u044f \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e pause\/resume (\u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0432\u0435\u0440\u043d\u0443\u0442\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u0433\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f).<\/p>\n<p>  <s>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u044f \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043b \u0441 \u0442\u0435\u0445 \u043f\u043e\u0440, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0435\u0433\u043e \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u043c:<\/s><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">TemporarySet<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class TemporarySet&lt;TItem&gt; extends Listenable&lt;TemporarySet.EventListener&gt; implements Resumable { \tprotected final SortedSet&lt;TemporaryElement&lt;TItem&gt;&gt; sortedElementsSet = new TreeSet&lt;&gt;(); \tprotected final List&lt;TItem&gt; list = new ArrayList&lt;&gt;();  \tprotected final Timer timer = new Timer(); \tprotected TimerTask timerTask = null; \tprotected TemporaryElement&lt;TItem&gt; nextElementToDie = null;  \tboolean isResumed = false;  \tpublic TemporarySet() { \t\tnotifier = new TemporarySet.EventListener() { \t\t\t@Override \t\t\tpublic void onCleared() { \t\t\t\tfor (TemporarySet.EventListener listener : getListenersSet()) { \t\t\t\t\tlistener.onCleared(); \t\t\t\t} \t\t\t}  \t\t\t@Override \t\t\tpublic void onAdded(Object item) { \t\t\t\tfor (TemporarySet.EventListener listener : getListenersSet()) { \t\t\t\t\tlistener.onAdded(item); \t\t\t\t} \t\t\t}  \t\t\t@Override \t\t\tpublic void onRemoved(Object item) { \t\t\t\tfor (TemporarySet.EventListener listener : getListenersSet()) { \t\t\t\t\tlistener.onRemoved(item); \t\t\t\t} \t\t\t} \t\t}; \t}  \tpublic boolean add(TItem object, DateTime deathTime) { \t\tTemporaryElement&lt;TItem&gt; element = new TemporaryElement&lt;&gt;(object, deathTime); \t\treturn _add(element); \t}  \tpublic boolean remove(TItem object) { \t\tTemporaryElement&lt;TItem&gt; element = new TemporaryElement&lt;&gt;(object); \t\treturn _remove(element); \t}  \tpublic void clear() { \t\t_clear(); \t}  \tpublic final List&lt;TItem&gt; asReadonlyList() { \t\treturn Collections.unmodifiableList(list); \t}  \tprivate synchronized void _clear() { \t\tcancelNextDeath(); \t\tlist.clear(); \t\tsortedElementsSet.clear();  \t\tnotifier.onCleared(); \t}   \tprivate synchronized boolean _add(TemporaryElement&lt;TItem&gt; insertingElement) { \t\tboolean wasInserted = _insertElementUnique(insertingElement);  \t\tif (wasInserted) { \t\t\tif (nextElementToDie != null && \t\t\t\t\tnextElementToDie.deathTime.isAfter(insertingElement.deathTime)) { \t\t\t\tcancelNextDeath(); \t\t\t}  \t\t\tif (nextElementToDie == null) { \t\t\t\topenNextDeath(); \t\t\t}  \t\t\tnotifier.onAdded(insertingElement.object); \t\t}  \t\treturn wasInserted; \t}  \tprivate synchronized boolean _remove(TemporaryElement&lt;TItem&gt; deletingElement) { \t\tboolean wasDeleted = _deleteElementByObject(deletingElement);  \t\tif (wasDeleted) { \t\t\tif (nextElementToDie.equals(deletingElement)) { \t\t\t\tcancelNextDeath(); \t\t\t\topenNextDeath(); \t\t\t}  \t\t\tnotifier.onRemoved(deletingElement.object); \t\t}  \t\treturn wasDeleted; \t}  \tprivate synchronized void openNextDeath() { \t\tcancelNextDeath(); \t\tif (sortedElementsSet.size() != 0) { \t\t\tnextElementToDie = sortedElementsSet.first(); \t\t\ttimerTask = new TimerTask() { \t\t\t\t@Override \t\t\t\tpublic void run() { \t\t\t\t\t_remove(nextElementToDie); \t\t\t\t} \t\t\t};  \t\t\tDateTime now = new DateTime(); \t\t\tDuration duration = TimeUtils.GetNonNegativeDuration(now, nextElementToDie.deathTime);  \t\t\ttimer.schedule(timerTask, duration.getMillis()); \t\t} \t}  \tprivate synchronized void cancelNextDeath() { \t\tif (timerTask != null) { \t\t\ttimerTask.cancel(); \t\t} \t\ttimer.purge(); \t\tnextElementToDie = null; \t\ttimerTask = null; \t}  \tprivate synchronized Iterator&lt;TemporaryElement&lt;TItem&gt;&gt; findElement(TemporaryElement&lt;TItem&gt; searchingElement) { \t\tIterator&lt;TemporaryElement&lt;TItem&gt;&gt; resultIterator = null; \t\tfor (Iterator&lt;TemporaryElement&lt;TItem&gt;&gt; iterator = sortedElementsSet.iterator(); iterator.hasNext() && resultIterator == null;) { \t\t\tif (iterator.next().equals(searchingElement)) { \t\t\t\tresultIterator = iterator; \t\t\t} \t\t} \t\treturn resultIterator; \t}  \tprivate synchronized boolean _insertElementUnique(TemporaryElement&lt;TItem&gt; element) { \t\tboolean wasInserted = false;  \t\tIterator&lt;TemporaryElement&lt;TItem&gt;&gt; iterator = findElement(element); \t\tif (iterator == null) { \t\t\twasInserted = true; \t\t\tsortedElementsSet.add(element); \t\t\tlist.add(element.object); \t\t}  \t\treturn wasInserted; \t}  \tprivate synchronized boolean _deleteElementByObject(TemporaryElement&lt;TItem&gt; element) { \t\tboolean wasDeleted = false;  \t\tIterator&lt;TemporaryElement&lt;TItem&gt;&gt; iterator = findElement(element); \t\tif (iterator != null) { \t\t\twasDeleted = true; \t\t\titerator.remove(); \t\t\tlist.remove(element.object); \t\t}  \t\treturn wasDeleted; \t}  \t@Override \tpublic void resume() { \t\tisResumed = true; \t\topenNextDeath(); \t}  \t@Override \tpublic void pause() { \t\tcancelNextDeath(); \t\tisResumed = false; \t}  \t@Override \tpublic boolean isResumed() { \t\treturn isResumed; \t}  \tpublic interface EventListener extends Listenable.EventListener { \t\tvoid onCleared(); \t\tvoid onAdded(Object item); \t\tvoid onRemoved(Object item); \t} } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0425\u043e\u0447\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043c\u043d\u043e\u044e \u043c\u0435\u0442\u043e\u0434 asReadonlyList. \u0420\u0430\u043d\u044c\u0448\u0435 \u043e\u043d \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 Adapter \u0434\u043b\u044f ListFragment, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u043e \u0438 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 EventListener. \u041d\u043e \u043f\u043e\u0437\u0434\u043d\u0435\u0435 \u044f \u0440\u0435\u0448\u0438\u043b \u043e\u0442\u043e\u0439\u0442\u0438 \u043e\u0442 \u044d\u0442\u043e\u0439 \u0437\u0430\u0442\u0435\u0438, \u0430 \u0432\u043e\u0442 \u043a\u043e\u0434 \u0440\u0435\u0448\u0438\u043b \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c (\u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u0435\u0431\u044f, \u0447\u0442\u043e\u0431\u044b \u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0441\u0442\u043e\u0438\u0442).<\/p>\n<p>  \u0421\u0430\u043c\u0430\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0432\u0430\u043a\u0445\u0430\u043d\u0430\u043b\u0438\u044f \u0432 \u044d\u0442\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435 \u0442\u0432\u043e\u0440\u0438\u0442\u0441\u044f \u0432 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 findElement, _insertElementUnique \u0438 _deleteElementByObject. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e SortedSet \u0445\u0440\u0430\u043d\u0438\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0434\u0430\u0442\u0435 \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u0438\u0441\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u0436\u0435 \u043f\u043e \u0434\u0430\u0442\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u044e\u0437\u0435\u0440 \u00ab\u0443\u043c\u0438\u0440\u0430\u0435\u0442\u00bb, \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c loginedAt == deathAt, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0441\u0443\u043c\u0430\u0441\u0448\u0435\u0441\u0442\u0432\u0438\u044e SortedSet \u0438 \u0432\u0441\u0435\u0433\u043e TemporarySet.<\/p>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0432 Java <a href=\"http:\/\/stackoverflow.com\/a\/156685\/2653714\">\u043d\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0445 Pair&lt;A,B&gt;<\/a>, \u0431\u044b\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043e\u0431\u0451\u0440\u0442\u043a\u0430:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">TemporaryElement<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">class TemporaryElement&lt;T&gt; implements Comparable { \tprotected final T object; \tprotected final DateTime deathTime;  \tpublic TemporaryElement(@NonNull T object, @NonNull DateTime deathTime) { \t\tthis.deathTime = deathTime; \t\tthis.object = object; \t}  \tpublic TemporaryElement(@NonNull T object) { \t\tthis(object, new DateTime(0)); \t}  \t@Override \tpublic boolean equals(Object o) { \t\tif (this == o) return true; \t\tif (o == null || getClass() != o.getClass()) return false;  \t\tTemporaryElement&lt;?&gt; that = (TemporaryElement&lt;?&gt;) o;  \t\treturn object.equals(that.object); \t}  \t@Override \tpublic int hashCode() { \t\treturn object.hashCode(); \t}  \t@Override \tpublic int compareTo(@NonNull Object another) { \t\tTemporaryElement a = this, \t\t\t\tb = (TemporaryElement) another;  \t\tint datesComparisionResult = a.deathTime.compareTo(b.deathTime); \t\tint objectsComparisionResult = a.hashCode() - b.hashCode(); \t\treturn (datesComparisionResult != 0) ? datesComparisionResult : objectsComparisionResult; \t} } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 TemporarySet \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\/\u0443\u0434\u0430\u043b\u044f\u0442\u044c \u044e\u0437\u0435\u0440\u043e\u0432 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0436\u0438\u0437\u043d\u0438, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 TemporarySet.EventListener \u0438 \u0436\u0434\u0430\u0442\u044c.<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0417\u0430\u0434\u0430\u0447\u043a\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c. \u042f \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u0442\u0443\u0447\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0440\u0430\u0437\u0431\u043e\u0440 Parse.com Guide. \u0412\u043e\u0442 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u044c\u044e\u0430\u043d\u0441\u043e\u0432:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">afterSave<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">Parse.Cloud.afterSave(&quot;Foo&quot;, function(request) {}); \/\/ custom Foo object Parse.Cloud.afterSave(&quot;User&quot;, function(request) {}); \/\/ custom(!) User object Parse.Cloud.afterSave(Parse.User, function(request) {}); \/\/ Parse.com User object Parse.Cloud.afterSave(Parse.Session, function(request) {}); \/\/ error! can't bind to Parse.Session <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0415\u0449\u0451 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0431\u044b\u043b\u043e \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043e \u043d\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430. \u0422\u043e\u0447\u043d\u0435\u0435, \u043d\u0435 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043f\u043e\u0438\u0441\u043a \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0442\u0430\u043a \u0438 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0439 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0441\u043f\u043e\u0441\u043e\u0431, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0432\u043e\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u044f \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043b <a href=\"http:\/\/stackoverflow.com\/questions\/32224797\/how-to-animate-gradient\">\u043d\u0430 stackoverflow \u043d\u0430 \u043b\u043e\u043c\u0430\u043d\u043d\u043e\u0439 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c<\/a>.<\/p>\n<p>  \u0412\u0435\u0441\u044c \u043c\u043e\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/Nexen23\/I_am_here\/tree\/1.2.1\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  \u0421\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e\u0441\u0442\u0438 \u0440\u0430\u0434\u0438, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a API \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 GetUsersChangesAfterDate(), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e\u0441\u043b\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0434\u0430\u0442\u044b (\u0442\u043e \u0431\u0438\u0448\u044c, \u0441\u0432\u0435\u0440\u043d\u0443\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 -&gt; \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b -&gt; GetUsersChangesAfterDate).<\/p>\n<p>  \u0418 \u0432 \u043a\u043e\u043d\u0446\u0435 \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e:  <\/p>\n<ol>\n<li>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0431\u044b\u043b\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0449\u0435, \u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e?<\/li>\n<li>\u0415\u0441\u0442\u044c \u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f UI \u043a\u0430\u0436\u0434\u044b\u0435 N \u0441\u0435\u043a\u0443\u043d\u0434?<\/li>\n<li>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0436\u0438\u0437\u043d\u0438 \u00ab0:0\u00bb \u0443 \u044e\u0437\u0435\u0440\u0430? \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043b\u0438 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c 1 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0436\u0438\u0437\u043d\u0438, \u0447\u0442\u043e\u0431\u044b \u044e\u0437\u0435\u0440 \u00ab\u0443\u043c\u0438\u0440\u0430\u043b\u00bb \u043f\u043e\u0441\u043b\u0435 \u00ab0:1\u00bb? \u0418\u043b\u0438 \u044d\u0442\u043e \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a-\u0442\u043e \u0438\u043d\u0430\u0447\u0435? \u0418\u043b\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u00ab0:0\u00bb \u2014 \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e?<\/li>\n<\/ol>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/266617\/\"> http:\/\/habrahabr.ru\/post\/266617\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041a\u0430\u043a-\u0442\u043e \u0440\u0430\u0437 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043c\u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u0437\u0430\u0434\u0430\u0447\u0443 \u0434\u043b\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438: \u043d\u0430\u043f\u0438\u0448\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 \u043b\u043e\u0433\u0438\u043d\u0430\/\u0440\u0430\u0437\u043b\u043e\u0433\u0438\u043d\u0430 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u043d\u043b\u0430\u0439\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u00ab\u0436\u0438\u0442\u044c\u00bb \u0442\u043e\u043b\u044c\u043a\u043e 30 \u0441\u0435\u043a\u0443\u043d\u0434. \u041a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u0432\u0430\u0435\u0442, \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b: \u0445\u0430, \u0447\u0442\u043e \u0442\u0443\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e? \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u044e\u0437\u0435\u0440\u043e\u0432, \u0430 \u0434\u0430\u043b\u044c\u0448\u0435 \u0434\u0435\u043b\u043e \u0437\u0430 \u043c\u0430\u043b\u044b\u043c\u2026 \u043d\u043e \u043d\u0435 \u0442\u0443\u0442 \u0442\u043e \u0431\u044b\u043b\u043e.<\/p>\n<p>  \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0431\u044d\u043a\u044d\u043d\u0434\u0430 \u043d\u0430 Parse.com \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f, \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 Pubnub, \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0451 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u043e\u0434 Android.<\/p>\n<p>  \u0422\u043e, \u0447\u0442\u043e \u0432\u044b\u0448\u043b\u043e \u0432 \u0438\u0442\u043e\u0433\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/Nexen23\/I_am_here\/dev\/app\/Demos\/I_am_here_SMALL.gif\" alt=\"\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-265373","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/265373","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=265373"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/265373\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=265373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=265373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=265373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}