在Android应用上使用Firebase应用内消息传递

Released almost 2 years ago, In-App-Messaging is a Firebase product that developers can use to send targeted messages (in form of dialogs) to their users. Setting it up and sending a test message is pretty straight forward, but there’s more that can be done to improve the User Experience.In this blog post, I’ll show some of the different ways to trigger and customize in-app messages.

In-App-Messaging是将近两年前发布的一种Firebase产品,开发人员可以使用它向用户发送目标消息(以对话框的形式)。 设置并发送测试消息很简单,但是还有许多工作可以改善用户体验。在这篇博客中,我将展示一些触发和自定义应用内消息的不同方法。

入门👶 (Getting Started 👶)

As mentioned above, sending a test message from Firebase In-App-Messaging (abbreviated as FIAM from this point on) is pretty simple and can be done in 4 steps:

如上所述,从Firebase应用内消息发送测试消息( 此后简称为FIAM )非常简单,可以通过4个步骤完成:

  1. Add the FIAM and Analytics dependencies to your build.gradle(app):

    将FIAM和Analytics依赖项添加到您的build.gradle(app)

implementation "com.google.firebase:firebase-inappmessaging-ktx:$fiamVersion"
implementation "com.google.firebase:firebase-analytics-ktx:$analyticsVersion"

2. Run the app to find your Installation ID in the logcat:

2.运行该应用程序以在日志猫中找到您的安装ID:

I/FIAM.Headless: Starting InAppMessaging runtime with Installation ID YOUR_INSTALLATION_ID

3. Go to the In-App Messaging tab on the Firebase Console, click on “New Campaign” and enter a Title for that campaign.

3.转到Firebase控制台上的“应用程序内消息传递”选项卡,单击“新建广告系列”,然后输入该广告系列的标题

4. Click “Test on your Device”, enter your Installation ID and click on “Test” to send the message.

4.单击“在设备上测试”,输入安装ID ,然后单击“测试”以发送消息。

Once you relaunch the app, you should now see your test message being displayed :)

重新启动应用程序后,您现在应该看到测试消息正在显示:) </

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值