[英]Huawei push kit message not received from clevertap push console
在這里我們集成了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);
}
如此處所述,您必須為華為集成 CleverTap SDK 。
最新的Push Kit 版本,請參考華為 Push Kit 文檔:
庫版本錯誤,'com.clevertap.android:clevertap-android-sdk:4.0.0',查看 這里
從清單中刪除“服務”,您將收到消息
一個。 如果選擇有“服務”,HmsPushService Class 不能像這樣為空。 它應該至少有更多的代碼,如github中的示例: onMessageReceived()
調用CleverTapAPI.createNotification(getApplicationContext(),extras)
灣。 在此 class 中添加更多代碼來處理推送、數據、應用內
如果上述步驟不起作用,請根據您的情況提供更多詳細信息。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.