为什么我的Firebase应用内消息在生产中不可靠? [英] Why are my Firebase In-app messages unreliable in production?

查看:44
本文介绍了为什么我的Firebase应用内消息在生产中不可靠?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应用内消息在测试模式下效果很好,但是在生产中似乎非常不可靠.我使用模范"作为消息布局.最简单的消息,没有任何图片.如果我将国家/地区设置为目标,则目标国家/地区似乎不会显示任何消息.

In-app messages work well in test mode, but seem to be very unreliable in production. I made campaigns with "Modals" as the message layout. The simplest possible messages, without any pictures. If I set countries as the targets, no messages seem to be shown in the target countries.

我有2个广告系列,没有任何国家/地区定位,并且显示了这些消息,但有时还是如此.这些活动中的第一个通知用户他们有机会达到1级.该消息显示的时间约为应显示的时间的50%(每台设备一次).有时消息显示得如此之快,以至于只是闪烁,因此无法阅读文本.在用户关闭之前,它会关闭.这些广告系列中的第二个广告系列会在达到1级时通知用户.与上面所述的结果相同.

I have 2 campaigns without any country targets and those messages get shown, but still just sometimes. The first of these campaigns informs the user they have an opportunity to reach Level 1. The message get shown about 50% of the times it should be shown (once per device). Sometimes the message get shown so quickly that it just flashes by, so it is impossible to read the text. It closes before the user closes it. The second of these campaigns inform the user when they have reached Level 1. It is the same result as described above here.

我对logEvent的调用是从方法调用的,这些方法是直接从应用程序主活动中的onresume方法调用的.它们是根据某些条件调用的,而不是每次都调用onresume.我的电话看起来像这样:

My calls to logEvent are from methods, which are directly called from the onresume method in the Main activity of the app. They are called according to certain conditions, not every time onresume is called. My calls look for instance like this:

FirebaseAnalytics.getInstance(this).logEvent("gyro_access",Bundle.EMPTY);

FirebaseAnalytics.getInstance(this).logEvent("gyro_access", Bundle.EMPTY);

如何使应用内消息在生产环境中可靠运行?

What can be done to make the In-app messages work in a reliable way in production?

推荐答案

我现在可以使用它.我改用这种方法来触发消息:

I got this to work now. I used this method instead to trigger the messages:

FirebaseInAppMessaging.getInstance().triggerEvent()

FirebaseInAppMessaging.getInstance().triggerEvent()

我还更新了Gradle,因此使用了最新版本的com.google.firebase:firebase-inappmessaging-display.

I also updated Gradle, so the latest version of com.google.firebase:firebase-inappmessaging-display was used.

因此,解决我的问题的方法是使用triggerEvent方法或更新Gradle.

So the solution to my problem was either using the triggerEvent-method or updating Gradle.

这篇关于为什么我的Firebase应用内消息在生产中不可靠?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆