How to disable the inappmessage showing on splash screen

655 views
Skip to first unread message

Othman El Jazouli

unread,
Apr 1, 2020, 11:47:24 AM4/1/20
to Firebase Google Group
I can successfully receive a message on my splash activity, but in reality I need to show in a later activity, I know the inappmessage is triggered by events, so in firebase in the scheduling section I removed all the events and added a new one, "login_activity_opened", which I trigger only after opening the login activity. but even with this config I always get the message right after I open the app, on splash screen level. 
Any idea how to resolve this? Thanks all!

sumitc...@google.com

unread,
Apr 2, 2020, 10:55:07 AM4/2/20
to Firebase Google Group
Hi Othman,

Sumit from the Firebase team here. So one thing to note about Firebase In-App Messaging is that fetches for messaging campaigns only occurs once per day to conserve device battery life, so if you made the change to your campaign it could take up to a day before you can see it working live on a device. So in case you made the change and then tested immediately after and saw that it didn't take effect yet, the previous process could explain why.

If you're using the testing on a device using the test setup, note that you might have to restart the app and bring it back into the foreground in order to receive the in-app message with the new campaign configuration.

If neither of the above help, could you share more details on how you're updating your Firebase In-App Messaging campaign and testing on it?

Thanks,
-Sumit

Othman El Jazouli

unread,
Apr 2, 2020, 11:28:29 AM4/2/20
to Firebase Google Group
Hey Summit 👋 

Thanks for the help, I'm actually using the Test on device feature in firebase, basically I get the InstanceID from android logs and test with that directly, I can see from logcat after I open the app that it's fetching campaigns and finds one, the text and design is usually updated, but what is confusing to me is why would the message show up when I haven't sent any event from the app yet. 

I would imagine the fetching will occur but nothing should be shown before the actual event of the specific campaign is sent from the app. 

This is the code I use to trigger the event: 
FirebaseAnalytics.getInstance(context).logEvent("login_activity_opened", trackEvent.getEventValues()?.toBundle())
FirebaseInAppMessaging.getInstance().triggerEvent("login_activity_opened")
I'm using both just in case, and this is the only thing I have on mobile side.

I attached a screenshot of what I have on firebase side, basically I removed the default events, and using Add event I entered login_activity_created which gave the option "create login_activity_created". 
Please note that this event is totally new and was created only through this Schedule config

I might be missing something, let me know if you need more info. cheers
Screenshot 2020-04-02 at 17.05.55.png

Sumit Chandel

unread,
Apr 6, 2020, 11:23:21 AM4/6/20
to fireba...@googlegroups.com
Hello again!

Thanks for the additional details. So in this case, test on device will show the Firebase In-App Message as soon as you click on 'Test', whether the event that will trigger the message was logged or not. That should explain why you're seeing the message immediately in the test-on-device scenario even if the analytics event wasn't logged yet. Admittedly we could probably update the docs a bit to make that clearer.

If you want to test on a real device, you would need to set up the campaign and wait at least a day for a newly created campaign so that it can get picked up by the device, and then trigger the event on the device to see the in-app message triggered from the expected analytics event.



--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/f1aafe13-316b-40ca-97ba-9bb470b5c556%40googlegroups.com.


--
Sumit Chandel
Developer Advocate, Firebase Team

Othman El Jazouli

unread,
Apr 6, 2020, 8:22:47 PM4/6/20
to Firebase Google Group
Thank you!! that explains everything! I will setup a full campaign then.
Cheers 
To unsubscribe from this group and stop receiving emails from it, send an email to fireba...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages