{"id":332221,"date":"2022-04-21T15:00:11","date_gmt":"2022-04-21T15:00:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=332221"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=332221","title":{"rendered":"<span>Huawei Mobile Services \u0438 AppGallery: \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>Huawei Services, \u0437\u0430\u0447\u0435\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0438 \u043a\u0430\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442? <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/b30\/01d\/c05\/b3001dc05fd9e6f5317d69a11eeb5a1e.jpg\" width=\"1000\" height=\"539\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b30\/01d\/c05\/b3001dc05fd9e6f5317d69a11eeb5a1e.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u043d\u044b\u0445<\/h3>\n<p>Huawei \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 Android-\u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u044b \u0431\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 Google \u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0433\u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Google Play, \u0441\u043e\u0437\u0434\u0430\u0432 \u0430\u043d\u0430\u043b\u043e\u0433\u0438: Huawei Services \u0438 AppGallery. <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u044d\u0442\u043e <em>420 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 700 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432<\/em>. \u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432.<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h3>\n<p>\u0423\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043f\u043e\u0434 \u0432\u0430\u0448\u0443 \u0432\u0435\u0440\u0441\u0438\u044e Gradle, <br \/>\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, Kotlin DSL.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>agconnect-services.json<\/code> \u0430\u043d\u0430\u043b\u043e\u0433\u00a0<code>google-services.json<\/code>. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<h3>build.gradle (project)<\/h3>\n<pre><code class=\"kotlin\">buildscript {       repositories {           google()           maven { url 'https:\/\/developer.huawei.com\/repo\/' }       }        dependencies {       ....         classpath 'com.huawei.agconnect:agcp:1.4.2.301'      }   }  allprojects {       repositories {           google()            maven { url 'https:\/\/developer.huawei.com\/repo\/' }       }   }<\/code><\/pre>\n<h3>build.gradle (app)<\/h3>\n<pre><code class=\"kotlin\">if(getGradle().getStartParameter().getTaskNames().toString().toLowerCase().contains(\"huawei\")) {     apply plugin: 'com.huawei.agconnect' } else {     \/\/\u041f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 }  dependencies { ... implementation \"com.huawei.agconnect:agconnect-core:1.4.1.300\u201d ... }<\/code><\/pre>\n<h3>\u0414\u043b\u044f ProGuard:<\/h3>\n<pre><code class=\"kotlin\">-ignorewarnings  -keep class com.huawei.agconnect.**{*;}<\/code><\/pre>\n<p>\u00a0\u0414\u043b\u044f DexGuard:<\/p>\n<pre><code class=\"kotlin\">-ignorewarnings -keep class com.huawei.agconnect.** {*;}  -keep resourcexmlelements **  -keep resources *\/*<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043b\u043e\u0449\u0430\u0434\u043e\u043a(AppGallery, Google Play) <br \/>\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432(Huawei, Google), \u0442\u043e \u043d\u0430\u0434\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0447\u0430\u0441\u0442\u0443\u044e \u0441\u043c\u0435\u043d\u0443 \u043f\u043e\u043b\u0438\u0442\u0438\u043a \u043c\u0430\u0440\u043a\u0435\u0442\u043e\u0432. <\/p>\n<p>Google \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u043b\u0430 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 \u043e\u0442 Huawei Services. \u041b\u0443\u0447\u0448\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0431\u043e\u0440\u043e\u043a.<\/p>\n<h3>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 Huawei \u0438 Google<\/h3>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0438 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a.  <\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c build flavours <code>huawei<\/code> \u0438 <code>google<\/code><\/p>\n<pre><code class=\"kotlin\">flavorDimensions \"mobileServices\" productFlavors {            google {         dimension \"mobileServices\"     }      huawei {         dimension \"mobileServices\"         applicationIdSuffix \".huawei\"     } }<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 build.gradle (app) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>googleImplementation<\/code> <br \/>\u0438 <code>huaweiImplementation<\/code><\/p>\n<pre><code class=\"kotlin\"> dependencies { ...     huaweiImplementation \"com.huawei.agconnect:agconnect-core:1.4.1.300\u201d ... }<\/code><\/pre>\n<\/li>\n<li>\n<p> \u041f\u043e\u043b\u043e\u0436\u0438\u0442\u044c <code>agconnect-services.json<\/code> \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <em>src\/huawei<\/em> , <br \/>\u0430 <code>google-services.json<\/code> \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <em>src\/google<\/em>. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 application package \u0443 \u043d\u0438\u0445 \u0440\u0430\u0437\u043d\u044b\u0435. \u0414\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 huawei \u0441\u0431\u043e\u0440\u043a\u0438 \u043a \u043f\u0430\u043a\u0435\u0442\u0443 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u201c.huawei\u201d<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>src\/main<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043b\u0430\u0434\u0451\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>src\/huawei<\/code> \u0438 <code>src\/google<\/code>. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432 <code>productFlavors<\/code>. \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f Gradle \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e7e\/20f\/235\/e7e20f23542d73287a332e1660a00d6f.png\" width=\"900\" height=\"450\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e7e\/20f\/235\/e7e20f23542d73287a332e1660a00d6f.png\"\/><figcaption><\/figcaption><\/figure>\n<h4>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 MessagingService<\/h4>\n<h3>\u0412\u0430\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439\/\u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435. \u0412 Google Services \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441 Task \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f callback&#8217;\u043e\u0432, \u043d\u043e \u0432 Huawei Services \u0435\u0433\u043e \u043d\u0435\u0442. Kotlin coroutine \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u043d\u0430 \u0437\u0430\u043c\u0435\u043d\u0443 \u0441\u0432\u043e\u0435\u0439 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u043e\u0441\u0442\u044c\u044e. \u0422\u043e\u0433\u0434\u0430 \u0431\u044b \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 suspend function.\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0443 \u043d\u0430\u0441 \u0436\u0451\u0441\u0442\u043a\u0438\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u043d\u0435\u0442 \u043a\u043e\u0440\u0443\u0442\u0438\u043d. \u0422\u043e\u0433\u0434\u0430  \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0439 \u0434\u043e\u0431\u0440\u044b\u0439 Thread.  \u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043d\u043e \u0434\u043e\u0440\u043e\u0433\u043e\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443  \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 ThreadPoolExecutor, \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0434 \u043d\u0430\u0448\u0438 \u043d\u0443\u0436\u0434\u044b.<\/h3>\n<pre><code class=\"kotlin\">class MessagingServiceImpl : MessagingService {    private var executor: \u0432\u0432ExecutorService = ThreadPoolExecutor(         CORE_THREAD_POOL_SIZE,         MAX_THREAD,         KEEP_ALIVE_THREAD_TIME,         TimeUnit.SECONDS,         LinkedBlockingQueue(CAPACITY_QUEUE),         ThreadUtils().threadFactory(Process.THREAD_PRIORITY_BACKGROUND)    )    private val handler = HandlerCompat.createAsync(Looper.getMainLooper())    override fun getToken(successCallback: (token: String) -> Unit) {     val task = Callable {       val token = instanceId.getToken(appId, tokenScope)       if (token != null &amp;&amp; token.isNotEmpty())           handler.post {               successCallback(token)           }      }          executor.submit(task)  }    override fun deleteToken(successCallback: () -> Unit) {      val task = Callable {         instanceId.deleteToken(appId, tokenScope)         handler.post {             successCallback()         }     }      executor.submit(task)   }     companion object {      private const val CORE_THREAD_POOL_SIZE = 0      private const val MAX_THREAD = 1      private const val KEEP_ALIVE_THREAD_TIME = 5L      private const val CAPACITY_QUEUE = 1   } }  class ThreadUtils {    fun threadFactory(     priority: Int   ): ThreadFactory = PriorityThreadFactory(priority) }  private class PriorityThreadFactory(     private val threadPriority: Int ) : ThreadFactory {    override fun newThread(runnable: Runnable): Thread {     val wrapperRunnable = Runnable {         try {             Process.setThreadPriority(threadPriority)         } catch (throwable: Throwable) {             Timber.e(throwable)         }         runnable.run()     }          return Thread(wrapperRunnable)   }  }<\/code><\/pre>\n<p>\u0412\u0443\u0430\u043b\u044f, \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0443 Task&#8217;\u0430\u043c \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u044b\u0445 \u043d\u0430\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442  <em>\u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0435<\/em> Google Services api. <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/tmtm\/articles\/tld\/images\/11811578\/tild3338-6261-4131-a564-393566383262__scheme.png\" alt=\"\" title=\"\" width=\"auto\" height=\"auto\" data-src=\"https:\/\/habrastorage.org\/getpro\/tmtm\/articles\/tld\/images\/11811578\/tild3338-6261-4131-a564-393566383262__scheme.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>Tooling<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 Google, \u0442\u043e \u043f\u043b\u0430\u0433\u0438\u043d ide <a href=\"https:\/\/developer.huawei.com\/consumer\/en\/huawei-toolkit\/\" rel=\"noopener noreferrer nofollow\">HMS Toolkit<\/a> \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439. <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437 \u0432\u0441\u0435\u0445 \u043c\u0435\u0441\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Google \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 <\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043c\u0435\u043d\u0430 Google \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043d\u0430 Huawei<\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 1<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043b\u0430\u0433\u0438\u043d \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 Androi Studio. \u041d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043f\u043b\u0430\u0433\u0438\u043d \u0432 <em>\u0441\u0442\u043e\u0440\u0435<\/em> <em>\u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432<\/em> \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0442\u0443\u0434\u0438\u0438 \u043d\u0435 \u043d\u0430\u0439\u0434\u0451\u0448\u044c. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u0442\u0443\u0434\u0438\u044e \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0439 <a href=\"https:\/\/developer.huawei.com\/consumer\/en\/doc\/development\/Tools-Guides\/overview-0000001050060881#section115911642133417\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0440\u0441\u0438\u0438<\/a><em>.<\/em><\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 2<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u043a\u0430\u0447\u0430\u0442\u044c Android Studio \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 <br \/>(\u0421\u043c\u043e\u0442\u0440\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 1),  \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c <a href=\"https:\/\/developer.android.com\/studio\/releases\/gradle-plugin?hl=ru\" rel=\"noopener noreferrer nofollow\">\u043e\u0448\u0438\u0431\u043a\u0443 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 Gradle<\/a>.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<ol>\n<li>\n<p><strong>Add HMS API<\/strong>. \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 GMS APIs \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f XMS adapter (\u043a\u0430\u043a \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435). \u041e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0443 \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0448\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432. \u042d\u0442\u043e \u0442\u0430\u043a\u0438\u0435 Extension-\u043a\u043b\u0430\u0441\u0441\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u0435\u0436\u0438\u0442 \u043a\u043e\u0434, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 HMS \u0438 GMS \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. Add HMS API(\u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442). \u0412 runtime \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0434\u0435\u0432\u0430\u0439\u0441\u043e\u043c \u0432\u0438\u0434 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b. \u041d\u0430\u0448 \u0432\u0430\u0440\u0438\u0430\u043d\u0442<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p><strong>To HMS API<\/strong> \u2013 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f GMS APIs \u043d\u0430 HMS APIs.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043c\u043e\u0436\u043d\u043e \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 pdf.<\/p>\n<h3>Debugging<\/h3>\n<p>\u0412\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e \u0438 \u043c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043d\u043e \u0443 \u043d\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0431\u044b\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0422\u043e\u0433\u0434\u0430 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u043b\u0430\u0447\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 <a href=\"https:\/\/developer.huawei.com\/consumer\/en\/doc\/development\/Tools-Guides\/introduction-0000001073540136\" rel=\"noopener noreferrer nofollow\">DigiX Lab<\/a> \u0434\u043b\u044f \u0434\u0435\u0431\u0430\u0433\u0430 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<p>\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f, <a href=\"https:\/\/developer.huawei.com\/consumer\/en\/doc\/development\/Tools-Guides\/introduction-0000001073540136\" rel=\"noopener noreferrer nofollow\"><em>Cloud Debugging<\/em><\/a> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435 \u0440\u0435\u0448\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: <\/p>\n<ul>\n<li>\n<p>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432<\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0443 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u0426\u0435\u043b\u044c <a href=\"https:\/\/developer.huawei.com\/consumer\/en\/doc\/development\/Tools-Guides\/introduction-0000001073380536\" rel=\"noopener noreferrer nofollow\"><em>Cloud Testing<\/em><\/a> \u2014 \u044d\u0442\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438, \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u044d\u043d\u0435\u0440\u0433\u043e\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 Huawei, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0451\u0442\u043e\u0432.<\/p>\n<h2>\u041d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430<\/h2>\n<p>\u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f\u00a0<a href=\"https:\/\/developer.huawei.com\/consumer\/en\/doc\/20501\" rel=\"noopener noreferrer nofollow\">Publishing API<\/a>\u00a0<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<h3>\u0421 \u044d\u0442\u0438\u043c\u0438 \u0432\u0432\u043e\u0434\u043d\u044b\u043c\u0438 \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0435 api. \u041c\u043d\u043e\u0433\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, IT \u0433\u0438\u0433\u0430\u043d\u0442\u044b \u0443\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 Huawei Services \u0438 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043b\u0438 \u0441\u0432\u043e\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 AppGallery. \u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438 \u0432\u0430\u043c \u043d\u0435 \u043e\u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0432\u043e\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c?<\/h3>\n<h3>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/developer.huawei.com\/consumer\/en\/doc\/development\/AppGallery-connect-Guides\/agc-get-started\" rel=\"noopener noreferrer nofollow\"><u>AppGallery Connect. Getting started with Android.<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/developer.huawei.com\/consumer\/en\/codelabsPortal\/index\" rel=\"noopener noreferrer nofollow\"><u>Huawei Codelabs<\/u><\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \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\/662297\/\"> https:\/\/habr.com\/ru\/post\/662297\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>Huawei Services, \u0437\u0430\u0447\u0435\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0438 \u043a\u0430\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442? <\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u043d\u044b\u0445<\/h3>\n<p>Huawei \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 Android-\u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u044b \u0431\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 Google \u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0433\u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Google Play, \u0441\u043e\u0437\u0434\u0430\u0432 \u0430\u043d\u0430\u043b\u043e\u0433\u0438: Huawei Services \u0438 AppGallery. <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u044d\u0442\u043e <em>420 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 700 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432<\/em>. \u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432.<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h3>\n<p>\u0423\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043f\u043e\u0434 \u0432\u0430\u0448\u0443 \u0432\u0435\u0440\u0441\u0438\u044e Gradle, <br \/>\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, Kotlin DSL.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>agconnect-services.json<\/code> \u0430\u043d\u0430\u043b\u043e\u0433\u00a0<code>google-services.json<\/code>. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<h3>build.gradle (project)<\/h3>\n<pre><code class=\"kotlin\">buildscript {       repositories {           google()           maven { url 'https:\/\/developer.huawei.com\/repo\/' }       }        dependencies {       ....         classpath 'com.huawei.agconnect:agcp:1.4.2.301'      }   }  allprojects {       repositories {           google()            maven { url 'https:\/\/developer.huawei.com\/repo\/' }       }   }<\/code><\/pre>\n<h3>build.gradle (app)<\/h3>\n<pre><code class=\"kotlin\">if(getGradle().getStartParameter().getTaskNames().toString().toLowerCase().contains(\"huawei\")) {     apply plugin: 'com.huawei.agconnect' } else {     \/\/\u041f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 }  dependencies { ... implementation \"com.huawei.agconnect:agconnect-core:1.4.1.300\u201d ... }<\/code><\/pre>\n<h3>\u0414\u043b\u044f ProGuard:<\/h3>\n<pre><code class=\"kotlin\">-ignorewarnings  -keep class com.huawei.agconnect.**{*;}<\/code><\/pre>\n<p>\u00a0\u0414\u043b\u044f DexGuard:<\/p>\n<pre><code class=\"kotlin\">-ignorewarnings -keep class com.huawei.agconnect.** {*;}  -keep resourcexmlelements **  -keep resources *\/*<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043b\u043e\u0449\u0430\u0434\u043e\u043a(AppGallery, Google Play) <br \/>\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432(Huawei, Google), \u0442\u043e \u043d\u0430\u0434\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0447\u0430\u0441\u0442\u0443\u044e \u0441\u043c\u0435\u043d\u0443 \u043f\u043e\u043b\u0438\u0442\u0438\u043a \u043c\u0430\u0440\u043a\u0435\u0442\u043e\u0432. <\/p>\n<p>Google \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u043b\u0430 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 \u043e\u0442 Huawei Services. \u041b\u0443\u0447\u0448\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0431\u043e\u0440\u043e\u043a.<\/p>\n<h3>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 Huawei \u0438 Google<\/h3>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0438 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a.  <\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c build flavours <code>huawei<\/code> \u0438 <code>google<\/code><\/p>\n<pre><code class=\"kotlin\">flavorDimensions \"mobileServices\" productFlavors {            google {         dimension \"mobileServices\"     }      huawei {         dimension \"mobileServices\"         applicationIdSuffix \".huawei\"     } }<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 build.gradle (app) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>googleImplementation<\/code> <br \/>\u0438 <code>huaweiImplementation<\/code><\/p>\n<pre><code class=\"kotlin\"> dependencies { ...     huaweiImplementation \"com.huawei.agconnect:agconnect-core:1.4.1.300\u201d ... }<\/code><\/pre>\n<\/li>\n<li>\n<p> \u041f\u043e\u043b\u043e\u0436\u0438\u0442\u044c <code>agconnect-services.json<\/code> \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <em>src\/huawei<\/em> , <br \/>\u0430 <code>google-services.json<\/code> \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <em>src\/google<\/em>. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 application package \u0443 \u043d\u0438\u0445 \u0440\u0430\u0437\u043d\u044b\u0435. \u0414\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 huawei \u0441\u0431\u043e\u0440\u043a\u0438 \u043a \u043f\u0430\u043a\u0435\u0442\u0443 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u201c.huawei\u201d<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>src\/main<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043b\u0430\u0434\u0451\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>src\/huawei<\/code> \u0438 <code>src\/google<\/code>. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432 <code>productFlavors<\/code>. \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f Gradle \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h4>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 MessagingService<\/h4>\n<h3>\u0412\u0430\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439\/\u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435. \u0412 Google Services \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441 Task \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f callback&#8217;\u043e\u0432, \u043d\u043e \u0432 Huawei Services \u0435\u0433\u043e \u043d\u0435\u0442. Kotlin coroutine \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u043d\u0430 \u0437\u0430\u043c\u0435\u043d\u0443 \u0441\u0432\u043e\u0435\u0439 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u043e\u0441\u0442\u044c\u044e. \u0422\u043e\u0433\u0434\u0430 \u0431\u044b \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 suspend function.\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0443 \u043d\u0430\u0441 \u0436\u0451\u0441\u0442\u043a\u0438\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u043d\u0435\u0442 \u043a\u043e\u0440\u0443\u0442\u0438\u043d. \u0422\u043e\u0433\u0434\u0430  \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0439 \u0434\u043e\u0431\u0440\u044b\u0439 Thread.  \u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043d\u043e \u0434\u043e\u0440\u043e\u0433\u043e\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443  \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 ThreadPoolExecutor, \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0434 \u043d\u0430\u0448\u0438 \u043d\u0443\u0436\u0434\u044b.<\/h3>\n<pre><code class=\"kotlin\">class MessagingServiceImpl : MessagingService {    private var executor: \u0432\u0432ExecutorService = ThreadPoolExecutor(         CORE_THREAD_POOL_SIZE,         MAX_THREAD,         KEEP_ALIVE_THREAD_TIME,         TimeUnit.SECONDS,         LinkedBlockingQueue(CAPACITY_QUEUE),         ThreadUtils().threadFactory(Process.THREAD_PRIORITY_BACKGROUND)    )    private val handler = HandlerCompat.createAsync(Looper.getMainLooper())    override fun getToken(successCallback: (token: String) -> Unit) {     val task = Callable {       val token = instanceId.getToken(appId, tokenScope)       if (token != null &amp;&amp; token.isNotEmpty())           handler.post {               successCallback(token)           }      }          executor.submit(task)  }    override fun deleteToken(successCallback: () -> Unit) {      val task = Callable {         instanceId.deleteToken(appId, tokenScope)         handler.post {             successCallback()         }     }      executor.submit(task)   }     companion object {      private const val CORE_THREAD_POOL_SIZE = 0      private const val MAX_THREAD = 1      private const val KEEP_ALIVE_THREAD_TIME = 5L      private const val CAPACITY_QUEUE = 1   } }  class ThreadUtils {    fun threadFactory(     priority: Int   ): ThreadFactory = PriorityThreadFactory(priority) }  private class PriorityThreadFactory(     private val threadPriority: Int ) : ThreadFactory {    override fun newThread(runnable: Runnable): Thread {     val wrapperRunnable = Runnable {         try {             Process.setThreadPriority(threadPriority)         } catch (throwable: Throwable) {             Timber.e(throwable)         }         runnable.run()     }          return Thread(wrapperRunnable)   }  }<\/code><\/pre>\n<p>\u0412\u0443\u0430\u043b\u044f, \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0443 Task&#8217;\u0430\u043c \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u044b\u0445 \u043d\u0430\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442  <em>\u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0435<\/em> Google Services api. <\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<h3>Tooling<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 Google, \u0442\u043e \u043f\u043b\u0430\u0433\u0438\u043d ide <a href=\"https:\/\/developer.huawei.com\/consumer\/en\/huawei-toolkit\/\" rel=\"noopener noreferrer nofollow\">HMS Toolkit<\/a> \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439. <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437 \u0432\u0441\u0435\u0445 \u043c\u0435\u0441\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Google \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 <\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043c\u0435\u043d\u0430 Google \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043d\u0430 Huawei<\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 1<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043b\u0430\u0433\u0438\u043d \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 Androi Studio. \u041d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043f\u043b\u0430\u0433\u0438\u043d \u0432 <em>\u0441\u0442\u043e\u0440\u0435<\/em> <em>\u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432<\/em> \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0442\u0443\u0434\u0438\u0438 \u043d\u0435 \u043d\u0430\u0439\u0434\u0451\u0448\u044c. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u0442\u0443\u0434\u0438\u044e \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0439 <a href=\"https:\/\/developer.huawei.com\/consumer\/en\/doc\/development\/Tools-Guides\/overview-0000001050060881#section115911642133417\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0440\u0441\u0438\u0438<\/a><em>.<\/em><\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 2<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u043a\u0430\u0447\u0430\u0442\u044c Android Studio \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 <br \/>(\u0421\u043c\u043e\u0442\u0440\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 1),  \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c <a href=\"https:\/\/developer.android.com\/studio\/releases\/gradle-plugin?hl=ru\" rel=\"noopener noreferrer nofollow\">\u043e\u0448\u0438\u0431\u043a\u0443 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 Gradle<\/a>.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<ol>\n<li>\n<p><strong>Add HMS API<\/strong>. \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 GMS APIs \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f XMS adapter (\u043a\u0430\u043a \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435). \u041e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0443 \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0448\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432. \u042d\u0442\u043e \u0442\u0430\u043a\u0438\u0435 Extension-\u043a\u043b\u0430\u0441\u0441\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u0435\u0436\u0438\u0442 \u043a\u043e\u0434, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 HMS \u0438 GMS \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. Add HMS API(\u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442). \u0412 runtime \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0434\u0435\u0432\u0430\u0439\u0441\u043e\u043c \u0432\u0438\u0434 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b. \u041d\u0430\u0448 \u0432\u0430\u0440\u0438\u0430\u043d\u0442<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p><strong>To HMS API<\/strong> \u2013 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f GMS APIs \u043d\u0430 HMS APIs.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043c\u043e\u0436\u043d\u043e \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 pdf.<\/p>\n<h3>Debugging<\/h3>\n<p>\u0412\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e \u0438 \u043c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043d\u043e \u0443 \u043d\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0431\u044b\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0422\u043e\u0433\u0434\u0430 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u043b\u0430\u0447\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 <a href=\"https:\/\/developer.huawei.com\/consumer\/en\/doc\/development\/Tools-Guides\/introduction-0000001073540136\" rel=\"noopener noreferrer nofollow\">DigiX Lab<\/a> \u0434\u043b\u044f \u0434\u0435\u0431\u0430\u0433\u0430 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<p>\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f, <a href=\"https:\/\/developer.huawei.com\/consumer\/en\/doc\/development\/Tools-Guides\/introduction-0000001073540136\" rel=\"noopener noreferrer nofollow\"><em>Cloud Debugging<\/em><\/a> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435 \u0440\u0435\u0448\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: <\/p>\n<ul>\n<li>\n<p>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432<\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0443 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u0426\u0435\u043b\u044c <a href=\"https:\/\/developer.huawei.com\/consumer\/en\/doc\/development\/Tools-Guides\/introduction-0000001073380536\" rel=\"noopener noreferrer nofollow\"><em>Cloud Testing<\/em><\/a> \u2014 \u044d\u0442\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438, \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u044d\u043d\u0435\u0440\u0433\u043e\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 Huawei, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0451\u0442\u043e\u0432.<\/p>\n<h2>\u041d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430<\/h2>\n<p>\u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f\u00a0<a href=\"https:\/\/developer.huawei.com\/consumer\/en\/doc\/20501\" rel=\"noopener noreferrer nofollow\">Publishing API<\/a>\u00a0<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<h3>\u0421 \u044d\u0442\u0438\u043c\u0438 \u0432\u0432\u043e\u0434\u043d\u044b\u043c\u0438 \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0435 api. \u041c\u043d\u043e\u0433\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, IT \u0433\u0438\u0433\u0430\u043d\u0442\u044b \u0443\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 Huawei Services \u0438 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043b\u0438 \u0441\u0432\u043e\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 AppGallery. \u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438 \u0432\u0430\u043c \u043d\u0435 \u043e\u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0432\u043e\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c?<\/h3>\n<h3>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/developer.huawei.com\/consumer\/en\/doc\/development\/AppGallery-connect-Guides\/agc-get-started\" rel=\"noopener noreferrer nofollow\"><u>AppGallery Connect. Getting started with Android.<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/developer.huawei.com\/consumer\/en\/codelabsPortal\/index\" rel=\"noopener noreferrer nofollow\"><u>Huawei Codelabs<\/u><\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \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\/662297\/\"> https:\/\/habr.com\/ru\/post\/662297\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-332221","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/332221","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=332221"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/332221\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=332221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=332221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=332221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}