Why are my Firebase In-app messages unreliable in production?

℡╲_俬逩灬. 提交于 2021-02-05 09:22:53

问题


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.

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.

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);

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


回答1:


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

FirebaseInAppMessaging.getInstance().triggerEvent()

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

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



来源:https://stackoverflow.com/questions/65655110/why-are-my-firebase-in-app-messages-unreliable-in-production

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!