You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

FIAM:代码触发Firebase应用内消息无显示问题求助

Firebase In-App Messaging (FIAM) Not Showing - Troubleshooting Your Issue

Let’s break down the problem from your logs and code to get FIAM working correctly. The key blocker here is the ProviderInstaller module failure, which is preventing FIAM from fetching campaigns from Firebase services. Here’s how to fix it step by step:

1. Fix the ProviderInstaller Module Error (Core Issue)

Your logs show this critical warning:

W/ProviderInstaller: Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.

FIAM relies on Google Play Services' ProviderInstaller to maintain secure network connections with Firebase servers. Without this, it can’t fetch your campaigns. To resolve this:

  • Use a device/emulator with valid Google Play Services:
    • For emulators, select a system image that includes Google Play (look for "Google Play Intel x86 Atom System Image" in the Android SDK Manager).
    • For physical devices, update Google Play Services to the latest version via the Google Play Store.
  • Add the correct dependency to your build.gradle:
    In your app-level build.gradle file, ensure you have the Play Services Base dependency (which includes ProviderInstaller):
    implementation 'com.google.android.gms:play-services-base:17.6.0' // Use the latest available version
    

2. Verify Your Trigger Event & Campaign Setup

Your trigger code is:

FirebaseInAppMessaging.getInstance().triggerEvent("Draft campaign")

Double-check these details:

  • The event name in your code must exactly match the trigger event you configured in the Firebase Console (including spaces, capitalization, and spelling).
  • Ensure your campaign is not stuck in draft mode—even for testing, make sure you’ve enabled device-specific testing or published the campaign (draft campaigns won’t be fetched by default).

3. Confirm Firebase App Configuration

  • Make sure your google-services.json file is placed correctly in the app/ directory of your project.
  • Verify that the package name in google-services.json matches your debug package name (ru.ed.com.test.debug) exactly.

4. Handle Cache Warnings (Minor, But Good to Check)

The cache file warnings (No such file or directory) are normal on first run, but you can try clearing your app's data and restarting to let FIAM regenerate these files.

Additional Testing Tips

  • Test on a physical device first—emulators sometimes have inconsistent Google Play Services behavior.
  • Check the Firebase Console's campaign analytics to see if your device is being counted as an eligible user.
  • Ensure your device has an active internet connection when triggering the event.

内容的提问来源于stack exchange,提问作者Eduard Kornev

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 06:30:39