{"id":278817,"date":"2016-04-21T22:20:03","date_gmt":"2016-04-21T18:20:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=278817"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=278817","title":{"rendered":"\u00ab\u041f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e\u00bb \u2014 \u043f\u0443\u0442\u044c \u043e\u0442 \u0438\u0434\u0435\u0438 \u0434\u043b\u044f VK Mobile Challenge \u0434\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430"},"content":{"rendered":"<p>       \u0422\u0440\u0438 \u043c\u0435\u0441\u044f\u0446\u0430 \u0434\u0440\u0430\u0439\u0432\u0430 \u0438 \u0441\u0432\u0435\u0440\u0445\u0443\u0440\u043e\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u041d\u0435\u0440\u0432\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u043e\u0439 \u0437\u0430\u0448\u043a\u0430\u043b\u0438\u0432\u0430\u043b\u043e, \u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u043c \u043d\u0435 \u0438\u0441\u0441\u044f\u043a\u0430\u043b. \u041c\u044b \u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0438\u0445 \u0440\u0435\u0448\u0438\u0442\u044c \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. \u0418 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d2f\/7f5\/036\/d2f7f503679b49ec8c4ab6335a01ba35.png\"\/><br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043b\u0435\u043a\u0441\u0435\u0439, \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432\u0430\u043c \u043e \u043d\u0430\u0448\u0435\u043c \u043e\u043f\u044b\u0442\u0435 \u0443\u0447\u0430\u0441\u0442\u0438\u044f \u0432 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0435 \u0412\u041a \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c Android, iOS \u0438 Windows Phone. \u0414\u0443\u043c\u0430\u044e, \u043c\u043e\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u043e\u0432\u0438\u0447\u043a\u0430\u043c \u0442\u0440\u0435\u0437\u0432\u043e \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u0438\u043b\u044b \u0438 \u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0438\u0445 \u043e\u0436\u0438\u0434\u0430\u0435\u0442.<\/p>\n<p>  \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0430, \u0435\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, <a href=\"https:\/\/vk.com\/vkmc\">\u0437\u0434\u0435\u0441\u044c<\/a>, \u0438 \u043f\u0430\u0440\u0430 \u0441\u043b\u043e\u0432 \u043e \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0435. \u041d\u0430 \u043a\u043e\u043d\u043a\u0443\u0440\u0441 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u044b\u0439\u0442\u0438 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u00ab\u041f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u2013 \u0433\u043e\u0440\u043e\u0434 \u043d\u0430 \u043b\u0430\u0434\u043e\u043d\u0438\u00bb. \u0423 \u043d\u0430\u0441 \u0431\u044b\u043b\u043e \u043e\u043a\u043e\u043b\u043e 50 \u043f\u0430\u0431\u043b\u0438\u043a\u043e\u0432 \u00ab\u041f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e\u00bb \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0433\u043e\u0440\u043e\u0434\u0430\u0445, \u043d\u043e \u043d\u0430\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0435\u0435 \u0432\u0441\u0435 \u0433\u043e\u0440\u043e\u0434\u0441\u043a\u0438\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435. \u0418 \u043c\u044b \u043f\u0440\u0438\u043d\u044f\u043b\u0438\u0441\u044c \u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u0443. \u041d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0441\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0433\u043e\u0440\u043e\u0434\u0430 (\u0430\u0433\u0440\u0435\u0433\u0438\u0440\u0443\u044e\u0449\u0438\u0435\u0441\u044f \u0438\u0437 \u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435) \u0431\u044b\u043b\u0438 \u0431\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e. <\/p>\n<p>  \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0443\u0441\u043f\u0435\u0445\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u00ab\u041f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e\u00bb \u043c\u044b \u0432\u0437\u044f\u043b\u0438 \u0440\u0435\u0430\u043a\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 (Retention) \u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u043f\u0440\u0438\u0432\u044b\u0447\u043a\u0443 \u043b\u044e\u0434\u0435\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>  \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442:<\/p>\n<ul>\n<li>Retention 1 \u0434\u043d\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 30% (\u043d\u0435 \u043c\u043d\u043e\u0433\u043e, \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 50%),<\/li>\n<li>Retention 3 \u0434\u043d\u044f \u2013 18%<\/li>\n<li>Retention 7 \u0434\u043d\u044f \u2013 15%<\/li>\n<\/ul>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0438\u0445 \u0446\u0438\u0444\u0440, \u043d\u043e \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0432\u0441\u0435\u0433\u043e 4 \u043c\u0435\u0441\u044f\u0446\u0430, \u044d\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<br \/>  \u0417\u0430 \u044d\u0442\u0438 \u0442\u0440\u0438 \u043c\u0435\u0441\u044f\u0446\u0430, \u0447\u0442\u043e \u043c\u044b \u00ab\u043f\u0438\u043b\u0438\u043b\u0438\u00bb \u043f\u0440\u043e\u0435\u043a\u0442, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u041d\u0430\u0448\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0434\u0435\u043b\u044f\u0442\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c.<\/p>\n<h3>\u041a\u0435\u0439\u0441 \u043e\u0442 iOS \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/h3>\n<p>  \u00ab\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430\u0434 \u00ab\u041f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e\u00bb \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u0412\u043e\u0442 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445. \u041f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0437\u0430\u0441\u0443\u043d\u0443\u0442\u044c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u0441\u043a\u0440\u043e\u043b\u044f\u0449\u0438\u0439\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u043a\u0440\u043e\u043b\u043b\u043e\u043c. \u041d\u0435 \u0441\u0432\u0430\u0439\u043f\u043e\u043c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043a\u0440\u043e\u043b\u043b\u043e\u043c. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c UIPageViewController. \u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0447\u0443\u0442\u044c\u0435 \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u043e\u0434\u0432\u0435\u043b\u043e, \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043f\u043e\u0434\u0432\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0435. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 UICollectionView, \u044f\u0447\u0435\u0439\u043a\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f UIScrollView \u0441 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u044f \u0434\u043e\u0431\u0438\u043b\u0441\u044f \u043f\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c\u0438, \u043d\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043a\u0440\u043e\u043b\u043b \u043d\u0435 \u043f\u043e\u0434\u0430\u0432\u0430\u043b \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0436\u0438\u0437\u043d\u0438. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043a\u0430\u0441\u0430\u043d\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u0436\u0435\u0441\u0442\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u043e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438.<\/p>\n<pre><code class=\"objectivec\">- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {   if (!_isHorizontalScroll && !_isMultitouch) {       CGPoint point = [[touches anyObject] locationInView:self];       if (fabs(_originalPoint.x - point.x) &gt; kThresholdX && fabs(_originalPoint.y - point.y) &lt; kThresholdY) {           _isHorizontalScroll = YES;           [_currentChild touchesCancelled:[event touchesForView:self] withEvent:event];       }   }   if (_isHorizontalScroll){       [super touchesMoved:touches withEvent:event];   }else{       [_currentChild touchesMoved:touches withEvent:event];   } } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/ed0\/bdb\/1f8\/ed0bdb1f8e7945979c04991517102241.png\"\/><\/p>\n<h3>\u041a\u0435\u0439\u0441 \u043e\u0442 Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/h3>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 Clean Architecture (https:\/\/github.com\/android10\/Android-CleanArchitecture). \u0414\u0430\u043d\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0430 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u0445, \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0411\u043e\u0431\u043e\u043c \u041c\u0430\u0440\u0442\u0438\u043d\u043e\u043c. \u041d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u0443 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u0438 \u0435\u0451 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438, \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u0442\u0430\u0442\u0435\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<a href=\"https:\/\/habrahabr.ru\/post\/250659\/\"> \u00ab\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439\u2026 \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c?\u00bb<\/a>, \u0438 &quot;<a href=\"https:\/\/habrahabr.ru\/post\/269589\/\">\u0427\u0438\u0441\u0442\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/a>&quot;), \u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u043e \u0447\u0435\u043c \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u0434\u0430\u043b\u0435\u0435, \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0438\u043c\u0438. \u0421\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0439\u0434\u0443 \u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435, \u0432\u043e\u0437\u043d\u0438\u043a\u0448\u0435\u0439 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. <\/p>\n<p>  \u201c\u041f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u2014 \u0433\u043e\u0440\u043e\u0434 \u043d\u0430 \u043b\u0430\u0434\u043e\u043d\u0438\u201d \u2014 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0433\u043e\u0440\u043e\u0434\u0435. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0442 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u043f\u0438\u0441\u043a\u0443 \u0433\u043e\u0440\u043e\u0434\u043e\u0432, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043f\u043e \u0441\u0442\u0430\u0440\u0438\u043d\u043a\u0435: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 LocationManager, \u0438\u0437 \u043d\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432, \u0430 \u0438\u0437 \u043d\u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0443\u044e \u043b\u043e\u043a\u0430\u0446\u0438\u044e. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0434\u0443\u043c\u0430\u044e, \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u043d\u0438\u043c. \u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u043e. \u041d\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c. <\/p>\n<p>  1. \u0412 Android API &gt;=23 \u0432\u0432\u0435\u043b\u0438 Runtime Permossions. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043d\u0430 \u0434\u0435\u0432\u0430\u0439\u0441\u0430\u0445 \u0441 Android 6.0 \u043d\u0443\u0436\u043d\u043e \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. \u0423 \u043d\u0430\u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u2014 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435. \u041c\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b\u0438, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043f\u0443\u0433\u043d\u0443\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. <\/p>\n<p>  2. LocationManager \u043b\u0435\u0436\u0430\u043b \u0432 \u0441\u043b\u043e\u0435 presentation, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0442 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c, \u0437\u0430\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u0432 Clean Architecture.<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u044f \u043f\u0440\u0438\u0431\u0435\u0433\u043d\u0443\u043b \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u043e\u0442 \u042f\u043d\u0434\u0435\u043a\u0441\u0430: \u041b\u043e\u043a\u0430\u0442\u043e\u0440 (https:\/\/tech.yandex.ru\/locator\/). \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u043c \u0442\u043e\u0447\u043a\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 Wi-Fi \u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0441\u043e\u0442\u0430\u043c, \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f GPS. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u043c\u0441\u044f \u043e\u0442 \u043d\u0430\u0437\u043e\u0439\u043b\u0438\u0432\u043e\u0433\u043e \u0434\u0438\u0430\u043b\u043e\u0433\u0430. \u041d\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u043f\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u0434\u0430\u0451\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e:<\/p>\n<p>  &gt; \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u042f\u043d\u0434\u0435\u043a\u0441.\u041b\u043e\u043a\u0430\u0442\u043e\u0440 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 100000 \u043c\u0435\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u0435\u0441\u043b\u0438 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u043f\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0443 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0430 \u043f\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0443 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u043b\u0438 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c. \u0412\u044b\u0445\u043e\u0434\u0438\u0442, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043a LocationManager. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439: \u0421\u0434\u0435\u043b\u0430\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u042f\u043d\u0434\u0435\u043a\u0441 \u043b\u043e\u043a\u0430\u0442\u043e\u0440\u0443, \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u0435\u0440\u043d\u0443\u043b, \u043b\u0438\u0431\u043e \u0443 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u043b\u043e\u043a\u0430\u0446\u0438\u0438 &gt;= 100000 \u043c\u0435\u0442\u0440\u043e\u0432, \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e LocationManager\u0430.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0443 \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0437\u0430 \u0432\u044b\u0434\u0430\u0447\u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0432 \u0441\u043b\u043e\u0439 data, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u041d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u0432 \u0441\u043b\u043e\u0439 domain. \u042f \u0441\u043e\u0437\u0434\u0430\u043b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 LocationService:<\/p>\n<pre><code class=\"java\">public interface LocationService {    Observable&lt;LocationEntity&gt; getCurrentLocation(); } <\/code><\/pre>\n<p>  \u0418 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0435\u0433\u043e \u0432 UseCase:<\/p>\n<pre><code class=\"java\">public class GetCurrentLocationUseCase extends UseCase&lt;LocationEntity&gt; {    public static final String CASE_NAME = &quot;get_current_location&quot;;        private final LocationService mLocationService;    @Inject    public GetCurrentLocationUseCase(LocationService locationService, ThreadExecutor threadExecutor, PostExecutionThread postExecutionThread) {        super(threadExecutor, postExecutionThread);        mLocationService = locationService;    }    @Override    protected Observable&lt;LocationEntity&gt; buildUseCaseObservable() {        return mLocationService.getCurrentLocation();    } } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e\u0442 UseCase \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u00ab\u0437\u0430\u0438\u043d\u044a\u0435\u043a\u0442\u0438\u0442\u044c\u00bb \u0432 Presenter, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Dagger2, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0430\u0431\u0441\u0442\u0440\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430.<\/p>\n<pre><code class=\"java\">public class YandexLocationService implements LocationService, Constants {     public static final int MAX_PRECISION = 100000;    private final YandexLocatorService mYandexLocatorService;     @Inject    public YandexLocationService() {        RestAdapter restAdapter = new RestAdapter.Builder()                .setEndpoint(BASE_URL_LOCATOR)                .setLogLevel(RETROFIT_LOG_LEVEL)                .build();        mYandexLocatorService = restAdapter.create(YandexLocatorService.class);    }     @Override    public Observable&lt;LocationEntity&gt; getCurrentLocation() {        return getCurrentLocationByIp()                .timeout(DEFAULT_TIMEOUT, TimeUnit.SECONDS)                .filter(yandexLocation -&gt;                        yandexLocation.getPrecision() &lt; MAX_PRECISION)                .map(LocationTransformer::transformToLocationEntity);    }     public Observable&lt;YandexLocation&gt; getCurrentLocationByIp() {        return mYandexLocatorService.getLocation(getLocatorRequestObject());    }     public YandexRequest getLocatorRequestObject() {        return new YandexRequest(new Common(LOCATOR_VERSION, LOCATOR_API_KEY));    } } <\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e IP \u0430\u0434\u0440\u0435\u0441\u0443. \u0417\u0434\u0435\u0441\u044c \u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u044e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0441 \u043f\u043b\u043e\u0445\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e (&gt;= 100000) \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c YandexLocation \u0432 LocationEntity. \u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. \u0414\u043b\u044f \u043d\u0435\u0433\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Runtime Permissions, \u0430, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u042f \u0441\u0434\u0435\u043b\u0430\u043b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:<\/p>\n<pre><code class=\"java\">public interface PermissionsRequester {    Observable&lt;Boolean&gt; request(String... permissions); } <\/code><\/pre>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0431\u0443\u0434\u0435\u043c \u0432 \u0441\u043b\u043e\u0435 presentation \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 RxPermissions:<\/p>\n<pre><code class=\"java\">public class PermissionsRequesterImpl implements PermissionsRequester {    private final RxPermissions mRxPermissions;    public PermissionsRequesterImpl(Context context) {        mRxPermissions = RxPermissions.getInstance(context);    }    @Override    public Observable&lt;Boolean&gt; request(String... permissions) {        return mRxPermissions.request(permissions);    } } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:<\/p>\n<pre><code class=\"java\">public class SystemLocationService implements LocationService {    private final LocationManager mLocationManager;    private final PermissionsRequester mPermissionsRequester;    @Inject    public SystemLocationService(LocationManager locationManager, PermissionsRequester permissionsRequester) {        mLocationManager = locationManager;        mPermissionsRequester = permissionsRequester;    }    @Override    public Observable&lt;LocationEntity&gt; getCurrentLocation() {        return getCurrentGpsLocation()                .map(LocationTransformer::transformToLocationEntity);    }    public Observable&lt;Location&gt; getCurrentGpsLocation() {        return mPermissionsRequester                .request(Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION)                .flatMap(granted -&gt; granted ? findLastLocation() : Observable.error(new RuntimeException()));    }        private Observable&lt;Location&gt; findLastLocation() {        return Observable.create(new Observable.OnSubscribe&lt;Location&gt;() {            @Override            public void call(Subscriber&lt;? super Location&gt; subscriber) {                Location lastLocation = null;                List&lt;String&gt; providers = mLocationManager.getAllProviders();                if (providers != null && !providers.isEmpty()) {                    for (String provider : providers) {                        if (mLocationManager.isProviderEnabled(provider)) {                            Location auxLocation = mLocationManager.getLastKnownLocation(provider);                            if (auxLocation != null) {                                if (lastLocation == null) {                                    lastLocation = auxLocation;                                } else if (auxLocation.getTime() &gt; lastLocation.getTime()) {                                    lastLocation = auxLocation;                                }                            }                        }                    }                }                subscriber.onNext(lastLocation);                subscriber.onCompleted();            }        });    } } <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u044f \u0441\u0434\u0435\u043b\u0430\u043b 2 \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u041d\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0430. \u041a\u0430\u043a \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443? \u042f \u0441\u043e\u0437\u0434\u0430\u043b CompositeLocationService, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 LocationService \u0438 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0443\u044e \u043b\u043e\u043a\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"java\">public class CompositeLocationService implements LocationService {    public static final int DEFAULT_TIMEOUT = 30;    private final LocationService[] mLocationServices;    @Inject    public CompositeLocationService(LocationService... services) {        if (services == null || services.length == 0) {            throw new CompositeLocationEmptyException();        }        mLocationServices = services;    }    @Override    public Observable&lt;LocationEntity&gt; getCurrentLocation() {        return Observable.concat(                Observable.from(mLocationServices)                        .map(locationService -&gt;                                locationService                                        .getCurrentLocation()                                        .onErrorReturn(throwable -&gt; null)                                        .timeout(DEFAULT_TIMEOUT, TimeUnit.SECONDS, Observable.empty())                        )        )                .first(location -&gt; location != null);    } } <\/code><\/pre>\n<p>  \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 getCurrentLocation \u043c\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0434\u0440\u0443\u0433 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u043c, \u0438 \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0434\u0430\u0451\u043c \u0435\u0433\u043e, \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044f \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u044b. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432. \u0414\u0430\u043b\u0435\u0435, \u0432 \u0441\u043b\u043e\u0435 presentation, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 LocationModule, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Dagger2:<\/p>\n<pre><code class=\"java\">@Module public class LocationModule {    final PubApplication mPubApplication;    public LocationModule(PubApplication pubApplication) {        mPubApplication = pubApplication;    }    @Provides    @Singleton    Context providesApplicationContext() {        return mPubApplication;    }    @Provides    @Singleton    LocationManager providesLocationManager() {        return (LocationManager) mPubApplication.getSystemService(Context.LOCATION_SERVICE);    }    @Provides    @Singleton    PermissionsRequester providesRxPermissions(Context context) {        return new PermissionsRequesterImpl(context);    }    @Provides    @Singleton    YandexLocationService provideYandexLocationService() {        return new YandexLocationService();    }    @Provides    @Singleton    SystemLocationService provideSystemLocationService(LocationManager locationManager, PermissionsRequester permissionsRequester) {        return new SystemLocationService(locationManager, permissionsRequester);    }    @Provides    @Singleton    LocationService provideLocationService(YandexLocationService yandexLocationService, SystemLocationService systemLocationService) {        return new CompositeLocationService(yandexLocationService, systemLocationService);    } } <\/code><\/pre>\n<p>  \u0412\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e! \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GetCurrentLocationUseCase \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0435\u0440\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u0443\u0441\u0442\u044c \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e, \u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u044b. \u0414\u0438\u0430\u043b\u043e\u0433 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0435, \u0438, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043e\u0442\u043f\u0443\u0433\u043d\u0451\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u0418 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0451 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435, \u0441\u043b\u043e\u0439 presentation \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, data \u0437\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u0435\u043d, \u043d\u043e, \u0434\u0443\u043c\u0430\u044e, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u00ab\u0447\u0438\u0441\u0442\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b\u00bb.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/de0\/62b\/31e\/de062b31eedc42fd9d7a0257866b921f.png\"\/><\/p>\n<h3>\u041a\u0440\u0430\u0442\u043a\u043e \u043e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u0445<\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435, \u0432\u043e\u0442 \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439, \u043a\u0430\u043a\u0438\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438. \u0421\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0430 \u043d\u0430 \u0434\u0432\u0443\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 DigitalOcean \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 1 core\/1Gb RAM.<\/p>\n<p>  \u0411\u044d\u043a\u0435\u043d\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 PHP7 c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Yii2.<\/p>\n<p>  1 \u0441\u0435\u0440\u0432\u0435\u0440 \u2014 db-master, \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u0432\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435.<br \/>  2 \u0441\u0435\u0440\u0432\u0435\u0440 \u2014 db-slave, rest api, web \u043a\u043b\u0438\u0435\u043d\u0442.<br \/>  Web \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 AngularJS v1.5.2.<br \/>  \u0413\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 Geolocator \u043e\u0442 Yandex.<\/p>\n<p>  \u0418 \u043f\u043e\u0434 \u043a\u043e\u043d\u0435\u0446 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043e\u043a\u043e\u043b\u043e 3200 \u0433\u0440\u0443\u043f\u043f (\u043f\u0430\u0431\u043b\u0438\u043a\u043e\u0432), \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u041f\u0440\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0433\u0440\u0443\u043f\u043f \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 6 \u043c\u0438\u043d\u0443\u0442. \u0417\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043c\u0435\u0441\u044f\u0446 \u0431\u044b\u043b\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043e \u043e\u043a\u043e\u043b\u043e 2 \u043c\u043b\u043d \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u0441\u0442\u043e\u0432. \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u043e\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0435 \u0441\u0442\u0430\u0440\u0448\u0435 1 \u043c\u0435\u0441\u044f\u0446\u0430 \u0438 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 100 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435<\/p>\n<p>  \u0418 \u0434\u0430, \u043c\u044b \u0433\u043e\u0440\u0434\u0438\u043c\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u0440\u0435\u0434\u0438 \u043f\u043e\u0447\u0442\u0438 130 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430\u0448 \u00ab\u041f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e\u00bb \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0435\u043c\u043d\u043e\u0433\u0438\u0445, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 2 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445.<\/p>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0443\u0447\u0430\u0441\u0442\u0438\u044e \u0432 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0435 \u043c\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u0438\u043b\u044b \u0438 \u0431\u043e\u043b\u0435\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442. \u0418\u0441\u043f\u044b\u0442\u0430\u043b\u0438 \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u0439 \u0430\u0437\u0430\u0440\u0442 \u0438 \u0434\u0440\u0430\u0439\u0432 \u0438 \u0435\u0449\u0435 \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0441\u043f\u043b\u043e\u0442\u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043e\u0434\u043d\u043e\u0439 \u0438\u0434\u0435\u0435\u0439.       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/282193\/\"> https:\/\/habrahabr.ru\/post\/282193\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0422\u0440\u0438 \u043c\u0435\u0441\u044f\u0446\u0430 \u0434\u0440\u0430\u0439\u0432\u0430 \u0438 \u0441\u0432\u0435\u0440\u0445\u0443\u0440\u043e\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u041d\u0435\u0440\u0432\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u043e\u0439 \u0437\u0430\u0448\u043a\u0430\u043b\u0438\u0432\u0430\u043b\u043e, \u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u043c \u043d\u0435 \u0438\u0441\u0441\u044f\u043a\u0430\u043b. \u041c\u044b \u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0438\u0445 \u0440\u0435\u0448\u0438\u0442\u044c \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. \u0418 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d2f\/7f5\/036\/d2f7f503679b49ec8c4ab6335a01ba35.png\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-278817","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278817","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=278817"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278817\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=278817"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=278817"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=278817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}