【问题标题】:Firebase in app message dont skip activity应用消息中的 Firebase 不跳过活动
【发布时间】:2019-01-14 16:12:46
【问题描述】:
我想在加载屏幕上跳过应用程序中的消息。
我希望 Firebase 在 MainActivity 中的应用程序中显示消息,但我没有这样做。
你能帮帮我吗?
我尝试使用FirebaseInAppMessaging.getInstance().setMessagesSuppressed(true);。
但这总是清除所有消息。
【问题讨论】:
标签:
android
firebase
firebase-in-app-messaging
【解决方案1】:
在加载活动(OnCreate)时,您必须通过将标志设置为 true 来抑制消息,并在 OnDestroy 方法中通过以下行将 Suppressed 方法设置为 false。
FirebaseInAppMessaging.getInstance().setMessagesSuppressed(false);
所以在 Main Activity In App 消息会呈现。