标签: huawei-mobile-services

找不到 com.huawei.agconnect:agcp:1.0.0.300

Could not find com.huawei.agconnect:agcp:1.0.0.300.
Searched in the following locations:
  - https://jcenter.bintray.com/com/huawei/agconnect/agcp/1.0.0.300/agcp-1.0.0.300.pom
  - https://jcenter.bintray.com/com/huawei/agconnect/agcp/1.0.0.300/agcp-1.0.0.300.jar
  - https://dl.google.com/dl/android/maven2/com/huawei/agconnect/agcp/1.0.0.300/agcp-1.0.0.300.pom
  - https://dl.google.com/dl/android/maven2/com/huawei/agconnect/agcp/1.0.0.300/agcp-1.0.0.300.jar
Required by:
    project :
Run Code Online (Sandbox Code Playgroud)

我正在关注此文档,但仍面临问题。 https://developer.huawei.com/consumer/en/codelab/HMSAnalyticsKit/index.html#2

任何人都可以帮忙吗?

huawei-mobile-services

3
推荐指数
1
解决办法
2165
查看次数

以编程方式获取设备的 EMUI 版本

在我的应用程序执行过程中,我如何获得 EMUI 版本?有什么系统方法可以获取EMUI版本吗?

android kotlin huawei-mobile-services

3
推荐指数
1
解决办法
613
查看次数

是否可以在华为设备上实现Firebase动态链接?

我创建了使用动态链接的android应用程序

FirebaseApp.initializeApp(context)
Firebase.dynamicLinks
  .getDynamicLink(intent)
  .addOnSuccessListener(context) { successFunction(it) }
  .addOnFailureListener(context) { failureFunction(it) }

implementation 'com.google.firebase:firebase-dynamic-links-ktx:19.1.0'
implementation 'com.google.firebase:firebase-analytics:17.3.0'
Run Code Online (Sandbox Code Playgroud)

我找到了通过 HMS Core 将 firebase-analytics 代理到华为设备的教程: https://developer.huawei.com/consumer/en/doc/development/Tools-Guides/30935655 但根本没有有关 firebase-dynamic-links 的信息

是否有可能在最新的华为设备上使用 Firebase 动态链接?

android firebase huawei-mobile-services huawei-developers

3
推荐指数
1
解决办法
4773
查看次数

华为推送和SDK统计问题

为什么要访问华为推送和SDK统计报告" java.lang.RuntimeException: Unable to get provider com.huawei.agconnect.core.provider.AGConnectInitializeProvider: java.security.InvalidParameterException: url is null "

访问方式:

implementation'com.huawei.hms:push:4.0.3.300' 

implementation 'com.huawei.hms:hianalytics:5.0.0.301'
Run Code Online (Sandbox Code Playgroud)

sdk android push huawei-mobile-services appgallery

3
推荐指数
1
解决办法
639
查看次数

如何以编程方式获取华为应用市场上应用程序的版本?

我知道如何为 Google Play 商店做到这一点(在这里回答),但我没有找到 AppGallery 的方法。谢谢你!

更新#1

使用下面的答案,我通过以下步骤部分解决了这个问题:

  1. 创建具有管理员角色的 API 客户端,它还可以与应用程序管理员和操作一起使用。(此处的文档:API 客户端
  2. 获取访问令牌。(此处的文档:获取令牌
  3. 获取应用程序信息。(此处的文档:查询应用程序信息

查询应用程序信息的响应有很多有关应用程序的信息,包括“versionNumber”,但对我来说,它不提供“versionNumber”(我需要的单个信息),因为此参数是可选的。现在我又陷入困境了,因为我不明白我需要改变什么才能收到这个。

如果有人知道我该如何解决这个问题,非常感谢您的帮助。

更新#2

@shirley 的评论是正确的。该问题已在最新版本中修复,并已于本月发布。

android google-play huawei-mobile-services appgallery

3
推荐指数
1
解决办法
1695
查看次数

如何让“onMessageReceived”触发 React Native 中的通知(HMS 推送工具包)?

我正在尝试读取通知的有效负载,但该事件不会触发。它适用于数据消息,但似乎没有注意到通知。

安卓清单:

        <service
            android:name="com.huawei.hms.push.react.RNHmsMessageService"
            android:exported="true">
            <intent-filter>
                <action android:name="com.huawei.push.action.MESSAGING_EVENT" />
            </intent-filter>
        </service>
        <receiver android:name="com.huawei.hms.push.react.RNReceiver"/>
        <meta-data
            android:name="push_kit_auto_init_enabled"
            android:value="true" />
Run Code Online (Sandbox Code Playgroud)

RNHms消息服务

public void onMessageReceived(RemoteMessage message) {
        Log.i(TAG, "onMessageReceived is called");
        if (message == null) {
            Log.e(TAG, "Received message entity is null!");
            return;
        }

        Log.i(TAG, "getCollapseKey: " + message.getCollapseKey()...

        RemoteMessage.Notification notification = message.getNotification();
        if (notification != null) {
            Log.i(TAG, "\n getImageUrl: " + notification.getImageUrl()...
        }

        Boolean judgeWhetherIn10s = false;
        // If the messages are not processed in 10 seconds, the app needs to use …
Run Code Online (Sandbox Code Playgroud)

android react-native huawei-mobile-services huawei-push-notification

3
推荐指数
1
解决办法
1581
查看次数

华为 P40 Pro (ELS-NX9) 上发生 INSTALL_FAILED_ABORTED 错误

我正在尝试将我们现有的应用程序迁移到华为应用程序库。为了测试华为 AGC,我尝试在这款华为 P40 Pro (ELS-NX9) 设备上安装示例 Android 应用程序,但我不断收到此错误。这个应用程序只是 Android studio 中的一个基本应用程序。我也按照华为AGC的说明配置了该项目。

这就是我得到的

在物理设备上启动“应用程序”。

安装没有成功。

无法安装应用程序:INSTALL_FAILED_ABORTED

安装失败,原因是:“null”

重试

但是,我可以在其他物理设备上安装相同的应用程序。

我的Android studio版本是4.1.1

我尝试了有关此以及与类似问题相关的其他几个问题的给定提示,但仍然没有运气。

android android-studio huawei-mobile-services huawei-developers

3
推荐指数
1
解决办法
3299
查看次数

华为服务有类似的应用内审核吗

我刚刚为我的应用程序实现了应用内审核 SDK。但据我了解,这适用于具有 Google 服务的设备。

对于没有 Google 服务的华为设备,是否有相当于应用程序内审核的功能?或者在这种情况下,我应该邀请用户通过应用程序库的链接对应用程序进行评分吗?

android huawei-mobile-services

3
推荐指数
1
解决办法
2312
查看次数

com.huawei.hms:push:5.3.0.301 中的“AGConnectServicesConfig”类已弃用

当我将 pushSDK 更新到版本“5.3.0.301”时,我发现AGConnectServicesConfig它已被弃用。我想知道它的替代品是什么。如何在新版本中获取 app_id?我曾经像这样获得 app_id:

  String appId = AGConnectServicesConfig.fromContext(context).getString("client/app_id");
Run Code Online (Sandbox Code Playgroud)

更新时如何获取?

我找到了源代码,但我找不到任何替代品。

android push-notification kotlin huawei-mobile-services huawei-push-notification

3
推荐指数
1
解决办法
267
查看次数

检查华为移动服务(HMS)可用性

如何检测某个手机是否可以使用HMS服务?

这个问题与答案重复,但因为谷歌搜索没有为我提供 StackOverflow问题check huawei services is available的链接(项目中同时有 GMS 和 HMS)。让 Google 对此进行索引以获得更好的搜索可能性。

android huawei-mobile-services

3
推荐指数
2
解决办法
2222
查看次数