{"id":319302,"date":"2021-03-10T09:00:31","date_gmt":"2021-03-10T09:00:31","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=319302"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=319302","title":{"rendered":"\u041a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0441\u0430\u0439\u0442\u0435"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0417\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0433\u0440\u0443\u0437\u043e\u043f\u0435\u0440\u0435\u0432\u043e\u0437\u043a\u0430\u043c\u0438 \u043d\u0430 \u0441\u0432\u043e\u0435\u0439 \u0433\u0430\u0437\u0435\u043b\u0438, \u0438 \u0443 \u043c\u0435\u043d\u044f \u0440\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u0435\u0439 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0441\u043b\u0435\u0434\u0438\u0442 \u0437\u0430 \u0441\u0432\u043e\u0438\u043c \u0433\u0440\u0443\u0437\u043e\u043c \u0438\u043b\u0438 \u0442\u0435\u0445, \u043a\u0442\u043e \u0436\u0434\u0435\u0442 \u043c\u0430\u0448\u0438\u043d\u0443. \u0423 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. \u0418 \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432\u0430\u043c \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043a\u0441\u0442\u0430\u0442\u0438, \u043e\u0431\u043e\u0439\u0434\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u043e\u0440\u043e\u0433\u043e. \u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u043f\u044b\u0442\u0430 \u0432 \u0441\u0444\u0435\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u0446\u0435\u043b\u043e\u043c.<\/p>\n<p>   \u0412\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 Visual Studio Code <\/p>\n<\/li>\n<li>\n<p>\u0421\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438  Android Studio<\/p>\n<\/li>\n<li>\n<p>\u0410\u043a\u043a\u0430\u0443\u043d\u0442 \u0413\u0443\u0433\u043b \u0434\u043b\u044f API Google Maps<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0438 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 SQL<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0430 \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0435<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0445\u0435\u043c\u0443 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/284\/8e8\/685\/2848e868500527828c32f5619a39614a.png\" width=\"1244\" height=\"698\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0441\u0430\u0439\u0442, \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439 \u0432 index.html \u0444\u0430\u0439\u043b myJsCode.js, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u0430\u0436\u0434\u044b\u0435 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0438\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0432 google maps. \u0412 google maps \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 sql. Google maps \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u0430\u0440\u0442\u0443 \u0441 \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u043c, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0432 \u0442\u043e\u0447\u043a\u0435, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c. \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 myJsCode.js \u0447\u0435\u0440\u0435\u0437 coordinatesToBrowser.php \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u0436\u0434\u044b\u0435 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0417\u0430\u043f\u0438\u0441\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 coordinatesFromAndroid.php \u043a\u0430\u0436\u0434\u044b\u0435 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u044d\u0442\u0443 \u0441\u0445\u0435\u043c\u0443.<\/p>\n<p><strong>1.<\/strong>  \u0414\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 google maps \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f API \u043a\u043b\u044e\u0447. \u0414\u043b\u044f \u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430     <a href=\"https:\/\/cloud.google.com\/maps-platform\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/cloud.google.com\/maps-platform<\/u><\/a><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9dd\/9bd\/e1f\/9dd9bde1febe663c5a929b50934eed6b.png\" width=\"1578\" height=\"784\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Get started.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>\u0412 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c Maps JavaScript API.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4ac\/44f\/748\/4ac44f7486bf01e136523e0c442eecc9.png\" width=\"1599\" height=\"789\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Enable.<\/p>\n<p>\u0416\u043c\u0435\u043c \u043d\u0430 \u0433\u0430\u043c\u0431\u0443\u0440\u0433\u0435\u0440 -&gt; APIs &amp; Services -&gt; Credentials.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/88f\/868\/912\/88f868912ff4c8e3ea657251f9bfa113.png\" width=\"1593\" height=\"787\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 +Create Credentials<\/p>\n<p>\u0418 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 Api key<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f9c\/2d0\/6e5\/f9c2d06e56fc1f8fb5080a2934230856.png\" width=\"1597\" height=\"783\"><figcaption><\/figcaption><\/figure>\n<p><strong>2. <\/strong>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b index.html \u0438 style.css \u0438 myJsCode.js. \u041f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u043c \u0432  \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 Visual Studio Code, \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<u> <\/u><a href=\"https:\/\/www.youtube.com\/redirect?event=video_description&amp;redir_token=QUFFLUhqa3EzV0U3OGFhOGltWjJXOXI2UldmVWN2VEVXZ3xBQ3Jtc0trMWdzM056MXQ3TG1LdzVWTW5JRkhlT05sSW9fMnNTeWJMTUYyVHdUNTFibWp0VDdqZEtJOU5ub2poVDlxYUM2ZWZvWnBzUlpmellMT1hncDl1OE41UFhXaHhfN0pGdGRIM3VqTjIzMTEycTRQNF9Ebw&amp;q=https%3A%2F%2Fcode.visualstudio.com%2F\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/code.visualstudio.com\/<\/u><\/a><\/p>\n<p><strong>index.html <\/strong> \u0412 71 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0435 API key \u043d\u0430 \u0441\u0432\u043e\u0439. \u0412 69 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b myJsCode.js, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0438\u0436\u0435. \u0412 53 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u0432 \u0431\u043b\u043e\u043a\u0435 div \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u0440\u0442\u0430 \u0441 \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u043c. <\/p>\n<pre><code class=\"xml\">&lt;!doctype html&gt; &lt;html&gt;  &lt;head&gt;     &lt;meta charset=\"utf-8\"&gt;     &lt;meta name=\"viewport\" content=\"width=device-width\"&gt;     &lt;link rel=\"stylesheet\" , href=\"style.css\"&gt;     &lt;title&gt;\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0430\u0439\u0442\u0430&lt;\/title&gt;     &lt;meta name=\"description\"         content=\"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \" \/&gt;     &lt;meta name=\"Keywords\" content=\"\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430\" \/&gt;  &lt;\/head&gt;  &lt;body&gt;     &lt;div class=\"box\"&gt;         &lt;header &gt;             &lt;a class=\"logo\" href=\"index.html\"&gt;&lt;img src=\"images\/logo.jpg\" width=\"40\" height=\"40\" alt=\"logo\"&gt;&lt;\/a&gt;             &lt;h1 class=\"logoTitle\"&gt;\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1&lt;\/h1&gt;         &lt;\/header&gt;          &lt;div class=\"content\"&gt;             &lt;p class=\"phoneAndName\"&gt;                 &lt;a class=\"imgphone\" href=\"tel: 811111111\"&gt;                     &lt;img src=\"images\/phone.jpg\" width=\"30\" height=\"30\" alt=\"\"&gt;                 &lt;\/a&gt;                 &lt;b&gt;&lt;a class=\"telephone\" href=\"tel: 811111111\"&gt;8-111-11-11 &lt;\/a&gt;&lt;\/b&gt; &lt;b&gt;&lt;span class=\"yourName\"&gt;                         \u0412\u0430\u0448\u0435 \u0438\u043c\u044f&lt;\/span&gt;&lt;\/b&gt;             &lt;\/p&gt;                      &lt;p class=\"descriptionYourBuisless\"&gt;\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 &lt;\/p&gt;             &lt;div class=\"descriptionHeader2\"&gt;                 &lt;h2 class=\"Header2\"&gt;\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2:&lt;\/h2&gt;                 &lt;span class=\"Header2Text\"&gt; \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 &lt;\/span&gt;             &lt;\/div&gt;              &lt;div class=\"adPointers\"&gt;                 &lt;ul class=\"row1\"&gt;                     &lt;li&gt;\u041f\u0443\u043d\u043a\u04421&lt;\/li&gt;                     &lt;li&gt;\u041f\u0443\u043d\u043a\u04422&lt;\/li&gt;                   &lt;\/ul&gt;                 &lt;ul class=\"row2\"&gt;                     &lt;li&gt;\u041f\u0443\u043d\u043a\u04423&lt;\/li&gt;                     &lt;li&gt;\u041f\u0443\u043d\u043a\u04424&lt;\/li&gt;                 &lt;\/ul&gt;             &lt;\/div&gt;          &lt;\/div&gt;                  &lt;span&gt;&lt;\/span&gt;         &lt;div class=\"photoCargo\"&gt;             &lt;div id=\"map-canvas\"&gt;&lt;\/div&gt;         &lt;\/div&gt;          &lt;div class=\"descriptionHeader3\"&gt;             &lt;h3 class=\"Header3\"&gt;\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3:&lt;\/h2&gt;             &lt;span class=\"Header3Text\"&gt; \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 &lt;\/span&gt;         &lt;\/div&gt;         &lt;footer&gt;             &lt;hr&gt;             &lt;p&gt;\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u044b: \u0433. \u0412\u0430\u0448 \u0433\u043e\u0440\u043e\u0434 &lt;br \/&gt;                 Email: &lt;a class=\"foot\" href=\"mailto:yourMail@yandex.ru\"&gt;yourMail@yandex.ru&lt;\/a&gt; &lt;br \/&gt;\u0442\u0435\u043b\u0435\u0444\u043e\u043d: &lt;a                     class=\"foot\" href=\"tel: 8111111111\"&gt;8-111-11-11-11&lt;\/a&gt;             &lt;\/p&gt;         &lt;\/footer&gt;     &lt;\/div&gt;      &lt;script src=\"myJsCode.js\"&gt;&lt;\/script&gt;     &lt;script         src=\"https:\/\/maps.googleapis.com\/maps\/api\/js?v=3.exp&amp;key=AIzaSyBPV_qSO1VI11pXLJuvQtXzVh1pTQjFkC1&amp;callback=initialize\"&gt;         &lt;\/script&gt;  &lt;\/body&gt;  &lt;\/html&gt;<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0438\u0448\u0435\u043c  <strong>style.css<\/strong> \u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u043a\u0430\u043a \u0435\u0441\u0442\u044c. \u0417\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u0434 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e media \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<pre><code class=\"css\">*  {   margin: 0;   padding: 0; }  .box{     max-width:1560px;      margin: 0px auto;     padding: 0px 0px; }  header{    position: fixed;    background-color: white;    padding-top: 10px;    height:60px;    width: 100%;   box-shadow: 7px 7px 5px rgba(63, 62, 62, 0.6); \/* \u0422\u0435\u043d\u044c *\/ }  .content{    padding-top: 100px; }     .logo{   float:left;   margin-left: 10px; }  .logoTitle{       float:left;   margin-top: 10px;    margin-left: 10px;   text-decoration: none;   font-family: sans-serif;   font-size: 20px;   color: #000;     }   .phoneAndName{   text-align: center;   color: #000;    margin-bottom: 15px;  }  .imgphone{   text-decoration: none;  }  .telephone{   text-decoration: none;   font-family: sans-serif;   font-size: 30px;   color: #000;  }  .yourName{   color: #030c01;    font-size: 30px; }  .descriptionYourBuisless{   text-align: center;   font-size: 20px;   color: #000;    margin-bottom: 20px;     padding: 0px 10px;     }   .descriptionHeader2{   justify-content: center;   display:flex;  }  .Header2{   color: #000;    font-size: 20px;   padding-right: 10px;   padding-left: 40px; }  .Header2Text{   padding-right: 20px;   color: #000;    font-size: 20px;   margin-bottom: 20px; }   .photoCargo{   margin: auto;    width:55%;   height:100%;   color: #000;  }  .row1{   padding-left: 20px;   padding-right: 20px;   padding-bottom: 20px;   margin-right: 20px; }  .row2{    padding-left: 20px;    padding-right: 20px;    padding-bottom: 20px; }  li{    font-size: 20px;    color: #000;   }  #map-canvas{    height:600px;     width: 100%;    margin-top: 20px; }  .descriptionHeader3{   margin-top: 20px;   justify-content: center;   display:flex;  }  .Header3{   color: #000;    font-size: 20px;   padding-right: 10px;   padding-left: 40px; }   .Header3Text{   padding-right: 20px;   color: #000;    font-size: 20px;   margin-bottom: 20px; }   footer{    text-align: center;    font-size: 14px;    color: #000;     margin-top: 20px;    margin-bottom: 20px;     padding-left: 5px;    padding-right: 5px; }   @media(min-width: 1560px){   .adPointers{     justify-content: center;     display:flex;       }  } @media(max-width: 1560px){   .adPointers{     justify-content: center;      display:flex;    }     .box{       max-width:1460px;      } } @media(max-width: 1400px){     .box{       max-width:1360px;      }     .photoCargo{       width:60%;     } } @media(max-width: 1200px){     .box{       max-width:970px;      }     .photoCargo{       width:65%;     } } @media(max-width: 992px){     .box{         max-width:850px;      }     .photoCargo{       width:80%;     } } @media(max-width: 767px){     .box{       max-width:none;      }      .photoCargo{       width:90%;     } } @media(max-width: 695px){      .photoCargo{       width:95%;     }   } @media(max-width: 450px){     .adPointers{               flex-direction: column;         margin-left: 100px;      } }<\/code><\/pre>\n<p><strong>myJsCode.js <\/strong>\u0412 1 \u0438 2 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0412 6 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 google maps. \u0412\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 setTimeout \u043a\u0430\u0436\u0434\u044b\u0435 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0438\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0438\u0437 coordinatesToBrowser.php \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043d\u043e\u0432\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0432 google maps. \u0424\u0430\u0439\u043b coordinatesToBrowser.php \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0438\u0436\u0435.<\/p>\n<pre><code>window.lat = 37.7850; window.lng = -122.4383; var map; var mark;  var initialize = function () {     map = new google.maps.Map(document.getElementById('map-canvas'), { center: { lat: lat, lng: lng }, zoom: 12 });     mark = new google.maps.Marker({ position: { lat: lat, lng: lng }, map: map }); };  var compare=0;  let timerId = setTimeout(function tick() {  var xhr = new XMLHttpRequest();      xhr.open('GET', 'coordinatesToBrowser.php', true);      xhr.onreadystatechange = function() {          if (xhr.readyState == 4 &amp;&amp; xhr.status == 200) {           var jsonObj=JSON.parse(xhr.responseText);           const arr = Object.keys(jsonObj).map((key) =&gt; [key, jsonObj[key]]);                   lat= parseFloat(arr[0][1]);          lng= parseFloat(arr[1][1]);          if(compare!=lat){           map.setCenter({ lat: lat, lng: lng, alt: 0 });           mark.setPosition({ lat: lat, lng: lng, alt: 0 });          }          compare=lat;         }      }      xhr.send(null);            timerId = setTimeout(tick, 2000); }, 2000);<\/code><\/pre>\n<p><strong>3.<\/strong>  \u0412\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0445\u043e\u0441\u0442. \u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 php MyAdmin. \u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0435 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0412 \u043d\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c coordinates. \u0412 \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435 3 \u0441\u0442\u043e\u043b\u0431\u0446\u0430: <strong>id<\/strong>, <strong>latitude <\/strong>\u0438 <strong>longitude <\/strong>\u043a\u0430\u043a \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ed8\/2f0\/e63\/ed82f0e63dd2f234bc6b2b4acdbfe912.png\" width=\"1597\" height=\"787\"><figcaption><\/figcaption><\/figure>\n<p><strong>4. <\/strong> \u0414\u0430\u043b\u0435\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441\u0430\u0439\u0442\u0430 \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0435 \u0434\u0432\u0430 php \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 coordinates. \u0424\u0430\u0439\u043b coordinatesToBrowser.php \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0438\u0437 \u0431\u0430\u0437\u044b, \u0430 coordinatesFromAndroid.php \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 android \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p><strong>coordinatesToBrowser.php<\/strong> \u0412 15 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u0438\u0437 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u043d\u0430\u043c\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b coordinates, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0437 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 latitude \u0438 longitude. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0441\u0430\u043c\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<pre><code class=\"php\">&lt;?php  $host = 'localhost';  \/\/ \u0425\u043e\u0441\u0442, \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e  $user = 'u1111111111';    \/\/ \u0418\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  $pass = '22222222'; \/\/ \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u043c\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e  $db_name = 'u11111111111';   \/\/ \u0418\u043c\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445  $link = mysqli_connect($host, $user, $pass, $db_name); \/\/ \u0421\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c\u0441\u044f \u0441 \u0431\u0430\u0437\u043e\u0439  \/\/ \u0420\u0443\u0433\u0430\u0435\u043c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c  if (!$link) {     \/\/ echo '\u041d\u0435 \u043c\u043e\u0433\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0441 \u0411\u0414. \u041a\u043e\u0434 \u043e\u0448\u0438\u0431\u043a\u0438: ' . mysqli_connect_errno() . ', \u043e\u0448\u0438\u0431\u043a\u0430: ' . mysqli_connect_error();      exit;  }  else{}       $sql = mysqli_query($link, \"SELECT * FROM coordinates\");   if ($sql) {     $row = $sql-&gt;fetch_assoc();     $lat=$row['latitude'];     $lon=$row['&lt;?php  $host = 'localhost';  \/\/ \u0425\u043e\u0441\u0442, \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e  $user = 'u1111111111';    \/\/ \u0418\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  $pass = '22222222'; \/\/ \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u043c\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e  $db_name = 'u11111111111';   \/\/ \u0418\u043c\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445  $link = mysqli_connect($host, $user, $pass, $db_name); \/\/ \u0421\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c\u0441\u044f \u0441 \u0431\u0430\u0437\u043e\u0439  \/\/ \u0420\u0443\u0433\u0430\u0435\u043c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c  if (!$link) {     \/\/ echo '\u041d\u0435 \u043c\u043e\u0433\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0441 \u0411\u0414. \u041a\u043e\u0434 \u043e\u0448\u0438\u0431\u043a\u0438: ' . mysqli_connect_errno() . ', \u043e\u0448\u0438\u0431\u043a\u0430: ' . mysqli_connect_error();      exit;  }  else{}       $sql = mysqli_query($link, \"SELECT * FROM coordinates\");   if ($sql) {     $row = $sql-&gt;fetch_assoc();     $lat=$row['latitude'];     $lon=$row['longitude'];        $cart = array(       \"latitude\" =&gt; $lat,       \"longitude\" =&gt; $lon,    );      echo json_encode( $cart );         } else {     \/\/ echo '&lt;p&gt;\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430: ' . mysqli_error($link) . '&lt;\/p&gt;';    } ?&gt;];        $cart = array(       \"latitude\" =&gt; $lat,       \"longitude\" =&gt; $lon,    );      echo json_encode( $cart );         } else {     \/\/ echo '&lt;p&gt;\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430: ' . mysqli_error($link) . '&lt;\/p&gt;';    } ?&gt;<\/code><\/pre>\n<p><strong>coordinatesFromAndroid.php<\/strong>. \u0412 22 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u0438\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044c \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043d\u043e\u0432\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<pre><code class=\"php\">&lt;?php  $Latitude=37.7850;  $Longitude=-122.4383;   $host = 'localhost';  \/\/ \u0425\u043e\u0441\u0442, \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e  $user = 'u1111111';    \/\/ \u0418\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  $pass = 'f2222222'; \/\/ \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u043c\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e  $db_name = 'u1111111';   \/\/ \u0418\u043c\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445  $link = mysqli_connect($host, $user, $pass, $db_name); \/\/ \u0421\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c\u0441\u044f \u0441 \u0431\u0430\u0437\u043e\u0439  \/\/ \u0420\u0443\u0433\u0430\u0435\u043c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c  if (!$link) {    \/\/  echo '\u041d\u0435 \u043c\u043e\u0433\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0441 \u0411\u0414. \u041a\u043e\u0434 \u043e\u0448\u0438\u0431\u043a\u0438: ' . mysqli_connect_errno() . ', \u043e\u0448\u0438\u0431\u043a\u0430: ' . mysqli_connect_error();      exit;  }  else{      if (!empty($_POST[\"Latitude\"]&amp;&amp;!empty($_POST[\"Longitude\"]))){      $Latitude=$_POST[\"Latitude\"];      $Longitude=$_POST[\"Longitude\"];     }        $sql = mysqli_query($link, \"UPDATE coordinates SET latitude='$Latitude', longitude='$Longitude' WHERE id='1'\");    if ($sql) {    \/\/ echo '&lt;p&gt;\u0414\u0430\u043d\u043d\u044b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.&lt;\/p&gt;';    } else {     \/\/ echo '&lt;p&gt;\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430: ' . mysqli_error($link) . '&lt;\/p&gt;';     }   } ?&gt;<\/code><\/pre>\n<p><strong>5. <\/strong> \u0417\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043a\u0430\u0436\u0434\u044b\u0435 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0443 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e gps \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u0430. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u0441\u0438 \u0438\u043b\u0438 \u043a\u0430\u0440\u0442\u044b, \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f &#8216;\u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0438\u043a&#8217; (\u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u044f). \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u0447\u0435\u043d\u044c \u0436\u0438\u0432\u0443\u0447\u0438\u0439 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0449\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043a\u0430\u0436\u0434\u044b\u0435 30 \u0441\u0435\u043a\u0443\u043d\u0434 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439, \u0435\u0441\u043b\u0438 \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u043e\u0447\u0438\u0441\u0442\u0438\u0442 \u043e\u0442 \u043d\u0435\u0433\u043e \u043f\u0430\u043c\u044f\u0442\u044c. <\/p>\n<p>\u0418\u0442\u0430\u043a \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0440\u0435\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Android Studio.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432\u044b\u0431\u0440\u0430\u0432 empty Activity<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9d0\/0c7\/6f9\/9d00c76f96195ebb9b0ac54cbd9f0eab.png\" width=\"901\" height=\"672\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u044f\u0437\u044b\u043a Java<\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4c1\/a03\/c3f\/4c1a03c3fa365250e02b010973fab857.png\" width=\"905\" height=\"682\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0431\u0430\u0440\u0435 \u0441\u043b\u0435\u0432\u0430 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0435 App -&gt; res -&gt; layout \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0435 \u0444\u0430\u0439\u043b activity_main.xml \u0438 \u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0430:<\/p>\n<p><strong>activity_main.xml<\/strong>   \u0424\u0430\u0439\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u0430 \u043d\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u043a\u043d\u043e\u043f\u043a\u0438 \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0438 \u0421\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u044f \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0438 \u0440\u0435\u0433\u0438\u043e\u043d\u0430.                                                                                                                           <\/p>\n<pre><code class=\"xml\">&lt;RelativeLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"     android:layout_width=\"match_parent\"     android:background=\"#ffffff\"     android:layout_height=\"match_parent\"&gt;     &lt;TextView         android:layout_width=\"match_parent\"         android:layout_height=\"50dp\"         android:background=\"@color\/col\"         android:gravity=\"center\"         android:text=\"GPS\"         android:textColor=\"#ffffff\"         android:textSize=\"20dp\" \/&gt;     &lt;LinearLayout         android:layout_width=\"match_parent\"         android:layout_height=\"wrap_content\"         android:layout_centerInParent=\"true\"         android:orientation=\"vertical\"&gt;         &lt;LinearLayout             android:layout_width=\"match_parent\"             android:orientation=\"horizontal\"             android:layout_height=\"50dp\"&gt;             &lt;TextView                 android:layout_width=\"150dp\"                 android:layout_height=\"wrap_content\"                 android:layout_gravity=\"center_vertical\"                 android:layout_marginLeft=\"10dp\"                 android:text=\"\u0428\u0438\u0440\u043e\u0442\u0430\"                 android:textColor=\"#000000\"                 android:textSize=\"20dp\" \/&gt;             &lt;TextView                 android:layout_width=\"wrap_content\"                 android:layout_height=\"wrap_content\"                 android:text=\"\"                 android:id=\"@+id\/tv_latitude\"                 android:layout_gravity=\"center_vertical\"                 android:layout_marginLeft=\"10dp\"                 android:textColor=\"#000000\"                 android:textSize=\"20dp\"\/&gt;         &lt;\/LinearLayout&gt;         &lt;LinearLayout             android:layout_width=\"match_parent\"             android:orientation=\"horizontal\"             android:layout_height=\"50dp\"&gt;             &lt;TextView                 android:layout_width=\"150dp\"                 android:layout_height=\"wrap_content\"                 android:layout_gravity=\"center_vertical\"                 android:layout_marginLeft=\"10dp\"                 android:text=\"\u0414\u043e\u043b\u0433\u043e\u0442\u0430\"                 android:textColor=\"#000000\"                 android:textSize=\"20dp\" \/&gt;             &lt;TextView                 android:layout_width=\"wrap_content\"                 android:layout_height=\"wrap_content\"                 android:text=\"\"                 android:id=\"@+id\/tv_longitude\"                 android:layout_gravity=\"center_vertical\"                 android:layout_marginLeft=\"10dp\"                 android:textColor=\"#000000\"                 android:textSize=\"20dp\"\/&gt;         &lt;\/LinearLayout&gt;         &lt;LinearLayout             android:layout_width=\"match_parent\"             android:orientation=\"horizontal\"             android:layout_height=\"50dp\"&gt;             &lt;TextView                 android:layout_width=\"150dp\"                 android:layout_height=\"wrap_content\"                 android:layout_gravity=\"center_vertical\"                 android:layout_marginLeft=\"10dp\"                 android:text=\"\u0410\u0434\u0440\u0435\u0441\"                 android:textColor=\"#000000\"                 android:textSize=\"20dp\" \/&gt;             &lt;TextView                 android:layout_width=\"wrap_content\"                 android:layout_height=\"wrap_content\"                 android:text=\"\"                 android:id=\"@+id\/tv_address\"                 android:layout_gravity=\"center_vertical\"                 android:layout_marginLeft=\"10dp\"                 android:textColor=\"#000000\"                 android:textSize=\"20dp\"\/&gt;         &lt;\/LinearLayout&gt;         &lt;LinearLayout             android:layout_width=\"match_parent\"             android:orientation=\"horizontal\"             android:layout_height=\"50dp\"&gt;              &lt;TextView                 android:layout_width=\"150dp\"                 android:layout_height=\"wrap_content\"                 android:layout_gravity=\"center_vertical\"                 android:layout_marginLeft=\"10dp\"                 android:text=\"\u041e\u0431\u043b\u0430\u0441\u0442\u044c\"                 android:textColor=\"#000000\"                 android:textSize=\"20dp\" \/&gt;             &lt;TextView                 android:layout_width=\"wrap_content\"                 android:layout_height=\"wrap_content\"                 android:text=\"\"                 android:id=\"@+id\/tv_area\"                 android:layout_gravity=\"center_vertical\"                 android:layout_marginLeft=\"10dp\"                 android:textColor=\"#000000\"                 android:textSize=\"20dp\"\/&gt;         &lt;\/LinearLayout&gt;         &lt;LinearLayout             android:layout_width=\"match_parent\"             android:orientation=\"horizontal\"             android:layout_height=\"50dp\"&gt;              &lt;TextView                 android:layout_width=\"150dp\"                 android:layout_height=\"wrap_content\"                 android:layout_gravity=\"center_vertical\"                 android:layout_marginLeft=\"10dp\"                 android:text=\"\u041b\u043e\u043a\u0430\u0446\u0438\u044f\"                 android:textColor=\"#000000\"                 android:textSize=\"20dp\" \/&gt;             &lt;TextView                 android:layout_width=\"wrap_content\"                 android:layout_height=\"wrap_content\"                 android:text=\"\"                 android:id=\"@+id\/tv_locality\"                 android:layout_gravity=\"center_vertical\"                 android:layout_marginLeft=\"10dp\"                 android:textColor=\"#000000\"                 android:textSize=\"20dp\"\/&gt;         &lt;\/LinearLayout&gt;     &lt;\/LinearLayout&gt;     &lt;Button         android:id=\"@+id\/btn_start\"         android:layout_width=\"match_parent\"         android:layout_height=\"wrap_content\"         android:layout_alignParentBottom=\"false\"         android:layout_marginTop=\"121dp\"         android:layout_marginBottom=\"12dp\"         android:text=\"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b\" \/&gt;     &lt;Button         android:id=\"@+id\/btn_finish\"         android:layout_width=\"match_parent\"         android:layout_height=\"wrap_content\"         android:layout_alignParentBottom=\"true\"         android:layout_marginBottom=\"55dp\"         android:text=\"\u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b\" \/&gt; &lt;\/RelativeLayout&gt;        <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 App -&gt;manifest \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0435 \u0444\u0430\u0439\u043b AndroidManifest.xml \u0438 \u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0430:<\/p>\n<p><strong>AndroidManifest.xml <\/strong>\u0424\u0430\u0439\u043b \u043d\u0435\u0441\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412 \u043d\u0435\u0433\u043e \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438, \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f\u0445 \u0438 \u0434\u0440\u0443\u0433\u043e\u043c. \u041e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0441\u0432\u043e\u0439 package=&#187;yourpackage&#187; \u0441\u0442\u0440\u043e\u0447\u043a\u0430 3. <\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt; &lt;manifest xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"     package=\"yourpackage\"&gt;     &lt;uses-permission android:name=\"android.permission.INTERNET\"\/&gt;     &lt;uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"\/&gt;     &lt;uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"\/&gt;     &lt;uses-permission android:name=\"android.permission.ACCESS_BACKGROUND_LOCATION\" \/&gt;     &lt;application          android:allowBackup=\"true\"         android:icon=\"@mipmap\/ic_launcher\"         android:label=\"@string\/app_name\"         android:supportsRtl=\"true\"         android:theme=\"@style\/AppTheme\"&gt;         &lt;activity android:name=\".MainActivity\"             android:theme=\"@android:style\/Theme.Translucent.NoTitleBar\"&gt;             &lt;intent-filter&gt;                 &lt;action android:name=\"android.intent.action.MAIN\" \/&gt;                 &lt;action android:name=\"android.intent.action.BOOT_COMPLETED\"\/&gt;                 &lt;category android:name=\"android.intent.category.LAUNCHER\" \/&gt;             &lt;\/intent-filter&gt;         &lt;\/activity&gt;         &lt;uses-library android:name=\"org.apache.http.legacy\" android:required=\"false\"\/&gt;         &lt;service android:enabled=\"true\" android:name=\".GoogleService\" \/&gt;          &lt;receiver android:name=\".MyAlarmReceiver\" \/&gt;     &lt;\/application&gt; &lt;\/manifest&gt;<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043d\u043e\u0432\u0430 App -&gt; res -&gt; values \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0435 \u0444\u0430\u0439\u043b colors.xml \u0438 \u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0430:<\/p>\n<p><strong>colors.xml <\/strong>\u0412 \u0444\u0430\u0439\u043b\u0435 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0446\u0432\u0435\u0442\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt; &lt;resources&gt;     &lt;color name=\"colorPrimary\"&gt;#6200EE&lt;\/color&gt;     &lt;color name=\"colorPrimaryDark\"&gt;#3700B3&lt;\/color&gt;     &lt;color name=\"colorAccent\"&gt;#03DAC5&lt;\/color&gt;     &lt;color name=\"colorTitle\"&gt;#808040&lt;\/color&gt;     &lt;color name=\"col\"&gt;#868602&lt;\/color&gt; &lt;\/resources&gt;<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 Gradle Scripts \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0435 \u0444\u0430\u0439\u043b  build.grande(Module app) \u0438 \u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0430:<\/p>\n<p><strong>build.grande(Module app) <\/strong>\u0412 \u0444\u0430\u0439\u043b\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u0431\u043e\u0440\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445. \u0412 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 5  \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0441\u0432\u043e\u0439  applicationId.<\/p>\n<pre><code>apply plugin: 'com.android.application'  android {     compileSdkVersion 30     buildToolsVersion \"30.0.2\" defaultConfig {     applicationId \"yourPackage\"     minSdkVersion 16     targetSdkVersion 30     versionCode 1     versionName \"1.0\"     multiDexEnabled true     testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"     useLibrary 'org.apache.http.legacy' \/\/ \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f HTTP Client }  buildTypes {     release {         minifyEnabled false         proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'     } } <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043d\u043e\u0432\u0430 App -&gt; Java -&gt; YourPackage \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0435 \u0444\u0430\u0439\u043b MainActivity.java \u0438 \u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0430:<\/p>\n<p><strong>MainActivity.java <\/strong>\u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u0434 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438.  \u0421\u0442\u0440\u043e\u043a\u0443 1 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0441\u0432\u043e\u044e.  \u0412 \u0444\u0430\u0439\u043b\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043d\u043e\u043f\u043e\u043a, \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439. \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f AlarmManager, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 &#8216;\u043f\u0440\u043e\u0431\u0443\u0436\u0434\u0430\u0435\u0442&#8217; \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043e\u043a. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041f\u0440\u0438\u0435\u043c \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0438 \u0440\u0435\u0433\u0438\u043e\u043d\u0430. \u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430 GoogleService , \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 gps \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438 btn_start. \u0421\u0431\u0440\u043e\u0441 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 btn_finish. \u0421\u0430\u043c GoogleService \u0438 AlarmManager \u043e\u043f\u0438\u0448\u0435\u043c \u043d\u0438\u0436\u0435.<\/p>\n<pre><code class=\"java\">package yourpackage; import android.Manifest; import android.app.Activity; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.location.Address; import android.location.Geocoder; import android.os.Bundle; import android.preference.PreferenceManager;  import android.view.View; import android.widget.Button;  import android.widget.TextView;  import android.widget.Toast;  import androidx.core.app.ActivityCompat;  import androidx.core.content.ContextCompat;  import java.io.IOException; import java.util.Calendar; import java.util.List; import java.util.Locale;  public class MainActivity extends Activity  {     public static boolean stsrtFinish = true;  Button btn_start; Button btn_finish;  private static final int REQUEST_PERMISSIONS = 100;  boolean boolean_permission;  TextView tv_latitude, tv_longitude, tv_address, tv_area, tv_locality;   SharedPreferences mPref;  SharedPreferences.Editor medit;   Double latitude, longitude; Geocoder geocoder; @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      final AlarmManager alarmMgr = (AlarmManager)getSystemService(Context.ALARM_SERVICE);     final Intent intent = new Intent(this, MyAlarmReceiver.class);     final PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent, 0);     Calendar time = Calendar.getInstance();     time.setTimeInMillis(System.currentTimeMillis());     time.add(Calendar.SECOND, 5);     alarmMgr.setRepeating(AlarmManager.RTC_WAKEUP, time.getTimeInMillis(),3000, pendingIntent);      btn_start = (Button) findViewById(R.id.btn_start);     btn_finish = (Button) findViewById(R.id.btn_finish);     tv_address = (TextView) findViewById(R.id.tv_address);     tv_latitude = (TextView) findViewById(R.id.tv_latitude);     tv_longitude = (TextView) findViewById(R.id.tv_longitude);     tv_area = (TextView) findViewById(R.id.tv_area);     tv_locality = (TextView) findViewById(R.id.tv_locality);     geocoder = new Geocoder(this, Locale.getDefault());     mPref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());     medit = mPref.edit();      btn_finish.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             stsrtFinish = false;             alarmMgr.cancel(pendingIntent);         }     });     btn_start.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             if (boolean_permission) {                 medit.putString(\"service\", \"service\").commit();                 Intent intent = new Intent(getApplicationContext(), GoogleService.class);                 startService(intent);             } else {                 Toast.makeText(getApplicationContext(), \"Please enable the gps\", Toast.LENGTH_SHORT).show();             }         }     });     fn_permission(); }  private void fn_permission() {     if ((ContextCompat.checkSelfPermission(getApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {         if ((ActivityCompat.shouldShowRequestPermissionRationale(MainActivity.this, android.Manifest.permission.ACCESS_FINE_LOCATION))) {         } else {             ActivityCompat.requestPermissions(MainActivity.this, new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION                     },                     REQUEST_PERMISSIONS);         }     } else {         boolean_permission = true;     } }  @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {     super.onRequestPermissionsResult(requestCode, permissions, grantResults);      switch (requestCode) {         case REQUEST_PERMISSIONS: {             if (grantResults.length &gt; 0 &amp;&amp; grantResults[0] == PackageManager.PERMISSION_GRANTED) {                 boolean_permission = true;              } else {                 Toast.makeText(getApplicationContext(), \"Please allow the permission\", Toast.LENGTH_LONG).show();             }         }     } }  private BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {     @Override     public void onReceive(Context context, Intent intent) {         latitude = Double.valueOf(intent.getStringExtra(\"latutide\"));         longitude = Double.valueOf(intent.getStringExtra(\"longitude\"));         List addresses = null;         try {             addresses = geocoder.getFromLocation(latitude, longitude, 1);             String cityName = addresses.get(0).getAddressLine(0);             String stateName = addresses.get(0).getAddressLine(1);             String countryName = addresses.get(0).getAddressLine(2);              tv_area.setText(addresses.get(0).getAdminArea());             tv_locality.setText(stateName);             tv_address.setText(countryName);         } catch (IOException e1) {             e1.printStackTrace();         }         tv_latitude.setText(latitude + \"\");         tv_longitude.setText(longitude + \"\");         tv_address.getText();     } };  @Override protected void onResume() {     super.onResume();     registerReceiver(broadcastReceiver, new IntentFilter(GoogleService.str_receiver));     if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &amp;&amp; ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {         return;     } } @Override protected void onStart() {     super.onStart(); } @Override protected void onPause() {     super.onPause(); } @Override protected void onStop() {     super.onStop(); } @Override protected void onDestroy() {     super.onDestroy();     unregisterReceiver(broadcastReceiver); } }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0414\u0430\u043b\u0435\u0435 \u0441\u043d\u043e\u0432\u0430 App -&gt; Java -&gt; YourPackage \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442\u0435 \u043f\u0440\u0430\u0432\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u043c\u044b\u0448\u0438, \u0432\u043e \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u043c \u043c\u0435\u043d\u044e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 Java class \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u0435\u0433\u043e GoogleService.java.<\/p>\n<p><strong>GoogleService.java  <\/strong>\u0421\u0442\u0440\u043e\u043a\u0443 1 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0441\u0432\u043e\u044e. \u0424\u0430\u0439\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 gps \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LocationManager. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 onLocationChanged \u0438\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043d\u0430 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 HttpPost post = new HttpPost(&#171;https:\/\/yourSite.ru\/coordinatesFromAndroid.php&#187;) \u0410\u0434\u0440\u0435\u0441 \u0441\u0430\u0439\u0442\u0430 \u043f\u043e\u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0430 90. <\/p>\n<pre><code class=\"java\">package yourpackage; import android.Manifest; import android.app.Service; import android.content.Intent; import android.content.pm.PackageManager; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.os.IBinder; import android.util.Log; import androidx.annotation.Nullable;  import androidx.core.app.ActivityCompat;  import org.apache.http.util.EntityUtils; import com.google.gson.JsonObject; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse;  import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient;  import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient;  import org.apache.http.message.BasicNameValuePair; import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpConnectionParams;  import org.apache.http.params.HttpParams;  import org.apache.http.protocol.HTTP;  import java.io.IOException;  import java.util.ArrayList;  import java.util.List;  public class GoogleService extends Service implements LocationListener {    private JsonObject message;  boolean isGPSEnable = false; double latitude, longitude;  LocationManager locationManager;  public static String str_receiver = \"servicetutorial.service.receiver\";  Intent intent;  List params; public GoogleService() { }  @Nullable @Override public IBinder onBind(Intent intent) {     return null; }  @Override public void onCreate() {     super.onCreate();     intent = new Intent(str_receiver);     message = new JsonObject();     params = new ArrayList();     locationManager = (LocationManager) getApplicationContext().getSystemService(LOCATION_SERVICE);     isGPSEnable = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);     if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &amp;&amp; ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {         return;     }     locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 2000, 10, this); }  @Override public void onLocationChanged(Location location) {     params = new ArrayList();     if (isGPSEnable) {         if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &amp;&amp; ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {             return;         }         location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);         if (location!=null) {             Log.e(\"location!=null\", \"location!=null\");             message.addProperty(\"lat\", location.getLatitude());             message.addProperty(\"lng\", location.getLongitude());               if(MainActivity.stsrtFinish) {                   params.add(new BasicNameValuePair(\"Latitude\", String.valueOf(location.getLatitude())));                   params.add(new BasicNameValuePair(\"Longitude\", String.valueOf(location.getLongitude())));               }               else{                   params.add(new BasicNameValuePair(\"Latitude\", \"37.7850\"));                   params.add(new BasicNameValuePair(\"Longitude\", \"-122.4383\"));               }             new Thread(new Runnable() {                         public void run() {                             try {                                 HttpParams httpParameters = new BasicHttpParams();                                 HttpConnectionParams.setConnectionTimeout(httpParameters, 10000);                                 HttpConnectionParams.setSoTimeout(httpParameters, 10000);                                 HttpClient httpClientpost = new DefaultHttpClient(httpParameters);                                 HttpPost post = new HttpPost(\"https:\/\/yourSite.ru\/coordinatesFromAndroid.php\");                                  UrlEncodedFormEntity ent = new UrlEncodedFormEntity(params, HTTP.UTF_8);                                 post.setEntity(ent);                                 HttpResponse responsePOST = httpClientpost.execute(post);                                 HttpEntity resEntity = responsePOST.getEntity();                                 String getresponse = EntityUtils.toString(resEntity);                                 \/\/Response from the server                                 Log.e(\"response\",getresponse);                             }                             catch (IOException e) {                                 e.printStackTrace();                                 Log.e(\"catch\",\"catch\");                             }                         }                     }).start();                      latitude = location.getLatitude();                     longitude = location.getLongitude();                     fn_update(location);         }     } } @Override public void onStatusChanged(String provider, int status, Bundle extras) {} @Override public void onProviderEnabled(String provider) { } @Override public void onProviderDisabled(String provider) { }  private void fn_update(Location location){     intent.putExtra(\"latutide\",location.getLatitude()+\"\");     intent.putExtra(\"longitude\",location.getLongitude()+\"\");     sendBroadcast(intent); } }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0414\u0430\u043b\u0435\u0435 \u0441\u043d\u043e\u0432\u0430 App -&gt; Java -&gt; YourPackage \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442\u0435 \u043f\u0440\u0430\u0432\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u043c\u044b\u0448\u0438, \u0432\u043e \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u043c \u043c\u0435\u043d\u044e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 Java class \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u0435\u0433\u043e MyAlarmReceiver.java.<\/p>\n<p><strong>MyAlarmReceiver.java <\/strong>\u0421\u0442\u0440\u043e\u043a\u0443 1 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0441\u0432\u043e\u044e. <strong> <\/strong>\u041a\u043e\u0434 \u0432 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 30 \u0441\u0435\u043a\u0443\u043d\u0434. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a GoogleService, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. <\/p>\n<pre><code class=\"java\">package yourpackage; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; public class MyAlarmReceiver extends BroadcastReceiver {    @Override     public void onReceive(Context context, Intent intent){      context.startService(new Intent(context, GoogleService.class));   } }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0435\u0441\u044c \u0447\u0435\u0440\u0435\u0437 usb \u043a \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443, \u0432 \u043e\u043a\u043e\u0448\u043a\u0435 Devices \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430. \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u043f\u0443\u0441\u043a. \u041d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d. \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a, \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 \u043c\u043e\u0439. \u0420\u0430\u0431\u043e\u0442\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/gaselka71.ru\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/gaselka71.ru<\/u><\/a><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0e5\/297\/bda\/0e5297bda20d81f0a6e7d11c1c5abde9.png\" width=\"1580\" height=\"859\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0432\u0438\u0434\u0435\u043e\u0444\u043e\u0440\u043c\u0430\u0442 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435 \u043d\u0430 \u043c\u043e\u0435\u043c \u043a\u0430\u043d\u0430\u043b\u0435:<\/p>\n<p><iframe id=\"6043b900189a112e083e61ce\" src=\"https:\/\/embedd.srv.habr.com\/iframe\/6043b900189a112e083e61ce\" class=\"embed_video embed__content\" allowfullscreen=\"true\"><\/iframe><\/p>\n<p>\u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u0416\u0435\u043b\u0430\u044e \u0443\u0434\u0430\u0447\u0438!<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/546286\/\"> https:\/\/habr.com\/ru\/post\/546286\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0417\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0433\u0440\u0443\u0437\u043e\u043f\u0435\u0440\u0435\u0432\u043e\u0437\u043a\u0430\u043c\u0438 \u043d\u0430 \u0441\u0432\u043e\u0435\u0439 \u0433\u0430\u0437\u0435\u043b\u0438, \u0438 \u0443 \u043c\u0435\u043d\u044f \u0440\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u0435\u0439 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0441\u043b\u0435\u0434\u0438\u0442 \u0437\u0430 \u0441\u0432\u043e\u0438\u043c \u0433\u0440\u0443\u0437\u043e\u043c \u0438\u043b\u0438 \u0442\u0435\u0445, \u043a\u0442\u043e \u0436\u0434\u0435\u0442 \u043c\u0430\u0448\u0438\u043d\u0443. \u0423 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. \u0418 \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432\u0430\u043c \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043a\u0441\u0442\u0430\u0442\u0438, \u043e\u0431\u043e\u0439\u0434\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u043e\u0440\u043e\u0433\u043e. \u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u043f\u044b\u0442\u0430 \u0432 \u0441\u0444\u0435\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u0446\u0435\u043b\u043e\u043c.<\/p>\n<p>   \u0412\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 Visual Studio Code <\/p>\n<\/li>\n<li>\n<p>\u0421\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438  Android Studio<\/p>\n<\/li>\n<li>\n<p>\u0410\u043a\u043a\u0430\u0443\u043d\u0442 \u0413\u0443\u0433\u043b \u0434\u043b\u044f API Google Maps<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0438 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 SQL<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0430 \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0435<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0445\u0435\u043c\u0443 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0441\u0430\u0439\u0442, \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439 \u0432 index.html \u0444\u0430\u0439\u043b myJsCode.js, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u0430\u0436\u0434\u044b\u0435 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0438\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0432 google maps. \u0412 google maps \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 sql. Google maps \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u0430\u0440\u0442\u0443 \u0441 \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u043c, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0432 \u0442\u043e\u0447\u043a\u0435, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c. \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 myJsCode.js \u0447\u0435\u0440\u0435\u0437 coordinatesToBrowser.php \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u0436\u0434\u044b\u0435 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0417\u0430\u043f\u0438\u0441\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 coordinatesFromAndroid.php \u043a\u0430\u0436\u0434\u044b\u0435 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u044d\u0442\u0443 \u0441\u0445\u0435\u043c\u0443.<\/p>\n<p><strong>1.<\/strong>  \u0414\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 google maps \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f API \u043a\u043b\u044e\u0447. \u0414\u043b\u044f \u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430     <a href=\"https:\/\/cloud.google.com\/maps-platform\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/cloud.google.com\/maps-platform<\/u><\/a><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Get started.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>\u0412 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c Maps JavaScript API.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Enable.<\/p>\n<p>\u0416\u043c\u0435\u043c \u043d\u0430 \u0433\u0430\u043c\u0431\u0443\u0440\u0433\u0435\u0440 -&gt; APIs &amp; Services -&gt; Credentials.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 +Create Credentials<\/p>\n<p>\u0418 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 Api key<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p><strong>2. <\/strong>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b index.html \u0438 style.css \u0438 myJsCode.js. \u041f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u043c \u0432  \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 Visual Studio Code, \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<u> <\/u><a href=\"https:\/\/www.youtube.com\/redirect?event=video_description&amp;redir_token=QUFFLUhqa3EzV0U3OGFhOGltWjJXOXI2UldmVWN2VEVXZ3xBQ3Jtc0trMWdzM056MXQ3TG1LdzVWTW5JRkhlT05sSW9fMnNTeWJMTUYyVHdUNTFibWp0VDdqZEtJOU5ub2poVDlxYUM2ZWZvWnBzUlpmellMT1hncDl1OE41UFhXaHhfN0pGdGRIM3VqTjIzMTEycTRQNF9Ebw&amp;q=https%3A%2F%2Fcode.visualstudio.com%2F\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/code.visualstudio.com\/<\/u><\/a><\/p>\n<p><strong>index.html <\/strong> \u0412 71 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0435 API key \u043d\u0430 \u0441\u0432\u043e\u0439. \u0412 69 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b myJsCode.js, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0438\u0436\u0435. \u0412 53 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u0432 \u0431\u043b\u043e\u043a\u0435 div \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u0440\u0442\u0430 \u0441 \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u043c. <\/p>\n<pre><code class=\"xml\">&lt;!doctype html&gt; &lt;html&gt;  &lt;head&gt;     &lt;meta charset=\"utf-8\"&gt;     &lt;meta name=\"viewport\" content=\"width=device-width\"&gt;     &lt;link rel=\"stylesheet\" , href=\"style.css\"&gt;     &lt;title&gt;\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0430\u0439\u0442\u0430&lt;\/title&gt;     &lt;meta name=\"description\"         content=\"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \" \/&gt;     &lt;meta name=\"Keywords\" content=\"\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430\" \/&gt;  &lt;\/head&gt;  &lt;body&gt;     &lt;div class=\"box\"&gt;         &lt;header &gt;             &lt;a class=\"logo\" href=\"index.html\"&gt;&lt;img src=\"images\/logo.jpg\" width=\"40\" height=\"40\" alt=\"logo\"&gt;&lt;\/a&gt;             &lt;h1 class=\"logoTitle\"&gt;\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1&lt;\/h1&gt;         &lt;\/header&gt;          &lt;div class=\"content\"&gt;             &lt;p class=\"phoneAndName\"&gt;                 &lt;a class=\"imgphone\" href=\"tel: 811111111\"&gt;                     &lt;img src=\"images\/phone.jpg\" width=\"30\" height=\"30\" alt=\"\"&gt;                 &lt;\/a&gt;                 &lt;b&gt;&lt;a class=\"telephone\" href=\"tel: 811111111\"&gt;8-111-11-11 &lt;\/a&gt;&lt;\/b&gt; &lt;b&gt;&lt;span class=\"yourName\"&gt;                         \u0412\u0430\u0448\u0435 \u0438\u043c\u044f&lt;\/span&gt;&lt;\/b&gt;             &lt;\/p&gt;                      &lt;p class=\"descriptionYourBuisless\"&gt;\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 &lt;\/p&gt;             &lt;div class=\"descriptionHeader2\"&gt;                 &lt;h2 class=\"Header2\"&gt;\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2:&lt;\/h2&gt;                 &lt;span class=\"Header2Text\"&gt; \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 &lt;\/span&gt;             &lt;\/div&gt;              &lt;div class=\"adPointers\"&gt;                 &lt;ul class=\"row1\"&gt;                     &lt;li&gt;\u041f\u0443\u043d\u043a\u04421&lt;\/li&gt;                     &lt;li&gt;\u041f\u0443\u043d\u043a\u04422&lt;\/li&gt;                   &lt;\/ul&gt;                 &lt;ul class=\"row2\"&gt;                     &lt;li&gt;\u041f\u0443\u043d\u043a\u04423&lt;\/li&gt;                     &lt;li&gt;\u041f\u0443\u043d\u043a\u04424&lt;\/li&gt;                 &lt;\/ul&gt;             &lt;\/div&gt;          &lt;\/div&gt;                  &lt;span&gt;&lt;\/span&gt;         &lt;div class=\"photoCargo\"&gt;             &lt;div id=\"map-canvas\"&gt;&lt;\/div&gt;         &lt;\/div&gt;          &lt;div class=\"descriptionHeader3\"&gt;             &lt;h3 class=\"Header3\"&gt;\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3:&lt;\/h2&gt;             &lt;span class=\"Header3Text\"&gt; \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 &lt;\/span&gt;         &lt;\/div&gt;         &lt;footer&gt;             &lt;hr&gt;             &lt;p&gt;\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u044b: \u0433. \u0412\u0430\u0448 \u0433\u043e\u0440\u043e\u0434 &lt;br \/&gt;                 Email: &lt;a class=\"foot\" href=\"mailto:yourMail@yandex.ru\"&gt;yourMail@yandex.ru&lt;\/a&gt; &lt;br \/&gt;\u0442\u0435\u043b\u0435\u0444\u043e\u043d: &lt;a                     class=\"foot\" href=\"tel: 8111111111\"&gt;8-111-11-11-11&lt;\/a&gt;             &lt;\/p&gt;         &lt;\/footer&gt;     &lt;\/div&gt;      &lt;script src=\"myJsCode.js\"&gt;&lt;\/script&gt;     &lt;script         src=\"https:\/\/maps.googleapis.com\/maps\/api\/js?v=3.exp&amp;key=AIzaSyBPV_qSO1VI11pXLJuvQtXzVh1pTQjFkC1&amp;callback=initialize\"&gt;         &lt;\/script&gt;  &lt;\/body&gt;  &lt;\/html&gt;<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0438\u0448\u0435\u043c  <strong>style.css<\/strong> \u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u043a\u0430\u043a \u0435\u0441\u0442\u044c. \u0417\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u0434 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e media \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<pre><code class=\"css\">*  {   margin: 0;   padding: 0; }  .box{     max-width:1560px;      margin: 0px auto;     padding: 0px 0px; }  header{    position: fixed;    background-color: white;    padding-top: 10px;    height:60px;    width: 100%;   box-shadow: 7px 7px 5px rgba(63, 62, 62, 0.6); \/* \u0422\u0435\u043d\u044c *\/ }  .content{    padding-top: 100px; }     .logo{   float:left;   margin-left: 10px; }  .logoTitle{       float:left;   margin-top: 10px;    margin-left: 10px;   text-decoration: none;   font-family: sans-serif;   font-size: 20px;   color: #000;     }   .phoneAndName{   text-align: center;   color: #000;    margin-bottom: 15px;  }  .imgphone{   text-decoration: none;  }  .telephone{   text-decoration: none;   font-family: sans-serif;   font-size: 30px;   color: #000;  }  .yourName{   color: #030c01;    font-size: 30px; }  .descriptionYourBuisless{   text-align: center;   font-size: 20px;   color: #000;    margin-bottom: 20px;     padding: 0px 10px;     }   .descriptionHeader2{   justify-content: center;   display:flex;  }  .Header2{   color: #000;    font-size: 20px;   padding-right: 10px;   padding-left: 40px; }  .Header2Text{   padding-right: 20px;   color: #000;    font-size: 20px;   margin-bottom: 20px; }   .photoCargo{   margin: auto;    width:55%;   height:100%;   color: #000;  }  .row1{   padding-left: 20px;   padding-right: 20px;   padding-bottom: 20px;   margin-right: 20px; }  .row2{    padding-left: 20px;    padding-right: 20px;    padding-bottom: 20px; }  li{    font-size: 20px;    color: #000;   }  #map-canvas{    height:600px;     width: 100%;    margin-top: 20px; }  .descriptionHeader3{   margin-top: 20px;   justify-content: center;   display:flex;  }  .Header3{   color: #000;    font-size: 20px;   padding-right: 10px;   padding-left: 40px; }   .Header3Text{   padding-right: 20px;   color: #000;    font-size: 20px;   margin-bottom: 20px; }   footer{    text-align: center;    font-size: 14px;    color: #000;     margin-top: 20px;    margin-bottom: 20px;     padding-left: 5px;    padding-right: 5px; }   @media(min-width: 1560px){   .adPointers{     justify-content: center;     display:flex;       }  } @media(max-width: 1560px){   .adPointers{     justify-content: center;      display:flex;    }     .box{       max-width:1460px;      } } @media(max-width: 1400px){     .box{       max-width:1360px;      }     .photoCargo{       width:60%;     } } @media(max-width: 1200px){     .box{       max-width:970px;      }     .photoCargo{       width:65%;     } } @media(max-width: 992px){     .box{         max-width:850px;      }     .photoCargo{       width:80%;     } } @media(max-width: 767px){     .box{       max-width:none;      }      .photoCargo{       width:90%;     } } @media(max-width: 695px){      .photoCargo{       width:95%;     }   } @media(max-width: 450px){     .adPointers{               flex-direction: column;         margin-left: 100px;      } }<\/code><\/pre>\n<p><strong>myJsCode.js <\/strong>\u0412 1 \u0438 2 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0412 6 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 google maps. \u0412\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 setTimeout \u043a\u0430\u0436\u0434\u044b\u0435 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0438\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0438\u0437 coordinatesToBrowser.php \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043d\u043e\u0432\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0432 google maps. \u0424\u0430\u0439\u043b coordinatesToBrowser.php \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0438\u0436\u0435.<\/p>\n<pre><code>window.lat = 37.7850; window.lng = -122.4383; var map; var mark;  var initialize = function () {     map = new google.maps.Map(document.getElementById('map-canvas'), { center: { lat: lat, lng: lng }, zoom: 12 });     mark = new google.maps.Marker({ position: { lat: lat, lng: lng }, map: map }); };  var compare=0;  let timerId = setTimeout(function tick() {  var xhr = new XMLHttpRequest();      xhr.open('GET', 'coordinatesToBrowser.php', true);      xhr.onreadystatechange = function() {          if (xhr.readyState == 4 &amp;&amp; xhr.status == 200) {           var jsonObj=JSON.parse(xhr.responseText);           const arr = Object.keys(jsonObj).map((key) =&gt; [key, jsonObj[key]]);                   lat= parseFloat(arr[0][1]);          lng= parseFloat(arr[1][1]);          if(compare!=lat){           map.setCenter({ lat: lat, lng: lng, alt: 0 });           mark.setPosition({ lat: lat, lng: lng, alt: 0 });          }          compare=lat;         }      }      xhr.send(null);            timerId = setTimeout(tick, 2000); }, 2000);<\/code><\/pre>\n<p><strong>3.<\/strong>  \u0412\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0445\u043e\u0441\u0442. \u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 php MyAdmin. \u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0435 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0412 \u043d\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c coordinates. \u0412 \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435 3 \u0441\u0442\u043e\u043b\u0431\u0446\u0430: <strong>id<\/strong>, <strong>latitude <\/strong>\u0438 <strong>longitude <\/strong>\u043a\u0430\u043a \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p><strong>4. <\/strong> \u0414\u0430\u043b\u0435\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441\u0430\u0439\u0442\u0430 \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0435 \u0434\u0432\u0430 php \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 coordinates. \u0424\u0430\u0439\u043b coordinatesToBrowser.php \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0438\u0437 \u0431\u0430\u0437\u044b, \u0430 coordinatesFromAndroid.php \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 android \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p><strong>coordinatesToBrowser.php<\/strong> \u0412 15 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u0438\u0437 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u043d\u0430\u043c\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b coordinates, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0437 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 latitude \u0438 longitude. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0441\u0430\u043c\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<pre><code class=\"php\">&lt;?php  $host = 'localhost';  \/\/ \u0425\u043e\u0441\u0442, \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e  $user = 'u1111111111';    \/\/ \u0418\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  $pass = '22222222'; \/\/ \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u043c\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e  $db_name = 'u11111111111';   \/\/ \u0418\u043c\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445  $link = mysqli_connect($host, $user, $pass, $db_name); \/\/<\/code><\/pre>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-319302","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/319302","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=319302"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/319302\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=319302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=319302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=319302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}