【问题标题】:Huawei push kit message not received from clevertap push console未从clevertap 推送控制台收到华为推送工具包消息
【发布时间】:2020-12-17 20:23:47
【问题描述】:

这里我们集成clevertap sdk如下,不知何故没有收到HMS push kit msg:

<service
   android:name="com.panda.demo.HmsPushService"
   android:exported="false">
   <intent-filter>
       <action android:name="com.huawei.push.action.MESSAGING_EVENT" />
   </intent-filter>
</service>

implementation 'com.clevertap.android:clevertap-android-sdk:3.8.2'


public class HmsPushService extends HmsMessageService {

    private static final String TAG = "pushdemo";
    @Override
    public void onNewToken(String token) {
        super.onNewToken(token);
        Log.i(TAG, "receive token:" + token);

    }

【问题讨论】:

    标签: push-notification huawei-developers huawei-push-notification huawei-mobile-services


    【解决方案1】:

    here 所述,您必须为华为集成 CleverTap SDK。

    Push Kit最新版本请参考华为Push Kit文档here

    1. 库版本错误,'com.clevertap.android:clevertap-android-sdk:4.0.0',检查here

    2. 从清单中删除“服务”,您将收到消息

      一个。如果你选择有“服务”,那么 HmsPushService 类不能像这样为空。它应该至少有更多的代码,如示例中的 githubonMessageReceived() 哪个电话
      CleverTapAPI.createNotification(getApplicationContext(),extras)

      b.在这个类中添加更多代码来处理推送、数据、应用内

    如果上述步骤不起作用,请根据您的情况提供更多详细信息。

    【讨论】:

    • 很好的步骤和文档,使用此解决方案后可以正常工作。
    猜你喜欢
    • 1970-01-01
    • 2023-03-28
    • 2012-10-27
    • 2014-12-16
    • 1970-01-01
    • 2018-05-01
    • 2020-07-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多