简体   繁体   English

Android应用内通知集成弹出窗口未显示

[英]Android In-App Notifications Integration Popup not showing

I have problem with Android In-App Notifications Integration when integrate into my app. 集成到我的应用程序时,Android应用程序内通知集成存在问题。 The campaign popup do not showing when receiver message from campaign push. 当来自活动推送的接收者消息时,活动弹出窗口不显示。 It just show notification like this: 它只是显示如下通知:

在此处输入图片说明

I did refer this guide of facebook to integrate: https://developers.facebook.com/docs/push-campaigns/android 我确实参考了Facebook的此指南以进行整合: https : //developers.facebook.com/docs/push-campaigns/android

My gradle: 我的gradle:

compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.facebook.android:notifications:1.+'

Have any suggestion for my problem? 对我的问题有什么建议吗? What's wrong in my way and how can i fix it? 我的方式有什么问题,我该如何解决? Thanks. 谢谢。

I think guide of facebook is missing intent data in onNewIntent method. 我认为Facebook的指南缺少onNewIntent方法中的意图数据。 I resolved it by: 我通过以下方式解决了它:

@Override
protected void onNewIntent(Intent intent) {
    super.onNewIntent(intent);
    if (intent != null) {
        NotificationsManager.presentCardFromNotification(this, intent);
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM