firebase-in-app-messaging

Integrates Firebase In-App Messaging into Flutter apps. Use when setting up in-app messaging, triggering or suppressing messages, managing user privacy and opt-in data collection, or testing campaigns.

520 stars

Best use case

firebase-in-app-messaging is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Integrates Firebase In-App Messaging into Flutter apps. Use when setting up in-app messaging, triggering or suppressing messages, managing user privacy and opt-in data collection, or testing campaigns.

Integrates Firebase In-App Messaging into Flutter apps. Use when setting up in-app messaging, triggering or suppressing messages, managing user privacy and opt-in data collection, or testing campaigns.

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "firebase-in-app-messaging" skill to help with this workflow task. Context: Integrates Firebase In-App Messaging into Flutter apps. Use when setting up in-app messaging, triggering or suppressing messages, managing user privacy and opt-in data collection, or testing campaigns.

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/firebase-in-app-messaging/SKILL.md --create-dirs "https://raw.githubusercontent.com/evanca/flutter-ai-rules/main/skills/firebase-in-app-messaging/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/firebase-in-app-messaging/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How firebase-in-app-messaging Compares

Feature / Agentfirebase-in-app-messagingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Integrates Firebase In-App Messaging into Flutter apps. Use when setting up in-app messaging, triggering or suppressing messages, managing user privacy and opt-in data collection, or testing campaigns.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Firebase In-App Messaging Skill

This skill defines how to correctly use Firebase In-App Messaging in Flutter applications.

## When to Use

Use this skill when:

* Setting up Firebase In-App Messaging in a Flutter project.
* Triggering or suppressing in-app messages programmatically.
* Implementing opt-in data collection for user privacy.
* Testing campaigns with specific devices.

---

## 1. Setup and Configuration

```
flutter pub add firebase_in_app_messaging
```

```dart
import 'package:firebase_in_app_messaging/firebase_in_app_messaging.dart';
```

- Initialize Firebase before using any In-App Messaging features.
- In-App Messaging **retrieves messages from the server once per day** by default to conserve power.

**Finding your Installation ID for testing:**
- **Android:** Look for `I/FIAM.Headless: Starting InAppMessaging runtime with Installation ID YOUR_INSTALLATION_ID` in logcat (filter by "FIAM.Headless").
- **iOS:** Enable debug mode by adding `-FIRDebugEnabled` as a runtime argument in Xcode's scheme settings; find `[Firebase/InAppMessaging][I-IAM180017]` in Xcode console logs.

---

## 2. Message Triggering and Display

Use Google Analytics events to trigger in-app messages without additional code. For programmatic triggering:

```dart
FirebaseInAppMessaging.instance.triggerEvent("eventName");
```

**Suppress messages during critical flows** (e.g., payment processing):

```dart
FirebaseInAppMessaging.instance.setMessagesSuppressed(true);
// Re-enable when appropriate:
FirebaseInAppMessaging.instance.setMessagesSuppressed(false);
```

- Suppression is **automatically turned off** on app restart.
- Suppressed messages are ignored — their trigger conditions must be met again after suppression is lifted.
- Platform-specific message interaction callbacks (iOS/Android) are not directly accessible from Flutter; use native APIs for those.

---

## 3. User Privacy and Opt-In Data Collection

By default, In-App Messaging automatically delivers messages to all targeted users.

**Disable automatic collection — iOS** (`Info.plist`):
```
FirebaseInAppMessagingAutomaticDataCollectionEnabled = NO
```

**Disable automatic collection — Android** (`AndroidManifest.xml`):
```xml
<meta-data
    android:name="firebase_inapp_messaging_auto_data_collection_enabled"
    android:value="false" />
```

**Enable for users who opt in:**
```dart
FirebaseInAppMessaging.instance.setAutomaticDataCollectionEnabled(true);
```

- Manually set preferences **persist through app restarts**, overriding configuration file values.

---

## 4. Testing and Debugging

- Use the Firebase console's **"Test on your Device"** feature, entering the app's Firebase Installation ID to send test messages on demand.
- Always test on **actual devices** for proper rendering and behavior.

---

## 5. Campaign Management

- Create campaigns in the Firebase console under **Messaging**.
- Message types: **modal**, **banner**, **card**, or **image-only**.
- Use **custom metadata** (key-value pairs) to pass additional info accessible when users interact with messages.
- Target based on user segments, app version, language, and Analytics-based conditions.
- Use **A/B testing** to optimize message content and delivery.
- Monitor campaign performance through Firebase console analytics.

---

## References

- [Firebase In-App Messaging Flutter documentation](https://firebase.google.com/docs/in-app-messaging/get-started?platform=flutter)

Related Skills

firebase-storage

520
from evanca/flutter-ai-rules

Integrates Firebase Cloud Storage into Flutter apps. Use when setting up Storage, uploading or downloading files, managing metadata, handling errors, or applying security rules.

firebase-remote-config

520
from evanca/flutter-ai-rules

Integrates Firebase Remote Config into Flutter apps. Use when setting up Remote Config, managing parameter defaults, fetching and activating values, implementing real-time updates, or handling throttling and testing.

firebase-messaging

520
from evanca/flutter-ai-rules

Integrates Firebase Cloud Messaging (FCM) into Flutter apps. Use when setting up push notifications, handling foreground/background messages, managing permissions, working with FCM tokens, or configuring platform-specific notification behavior.

firebase-database

520
from evanca/flutter-ai-rules

Integrates Firebase Realtime Database into Flutter apps. Use when setting up Realtime Database, structuring JSON data, querying, performing read/write operations, implementing offline capabilities, or applying security rules.

firebase-data-connect

520
from evanca/flutter-ai-rules

Integrates Firebase Data Connect into Flutter apps. Use when setting up Data Connect, designing queries, handling errors, or applying security and performance best practices.

firebase-crashlytics

520
from evanca/flutter-ai-rules

Integrates Firebase Crashlytics into Flutter apps. Use when setting up crash reporting, handling fatal and non-fatal errors, customizing crash reports with keys/logs/user identifiers, or configuring opt-in reporting.

firebase-cloud-functions

520
from evanca/flutter-ai-rules

Calls Firebase Cloud Functions from Flutter apps. Use when setting up callable functions, passing data to functions, handling errors from function calls, optimizing performance, or testing with the Firebase Emulator Suite.

firebase-cloud-firestore

520
from evanca/flutter-ai-rules

Integrates Cloud Firestore into Flutter apps. Use when setting up Firestore, designing document/collection structure, reading and writing data, working with real-time listeners, designing for scale, or applying security rules.

firebase-auth

520
from evanca/flutter-ai-rules

Integrates Firebase Authentication into Flutter apps. Use when setting up auth, managing auth state, implementing email/password or social sign-in, handling auth errors, managing users, or applying security best practices.

firebase-app-check

520
from evanca/flutter-ai-rules

Integrates Firebase App Check into Flutter apps. Use when setting up App Check, selecting providers per platform, using debug providers during development, enabling enforcement, or applying App Check security best practices.

firebase-analytics

520
from evanca/flutter-ai-rules

Integrates Firebase Analytics into Flutter apps. Use when setting up analytics, logging events, setting user properties, or configuring event parameters.

firebase-ai

520
from evanca/flutter-ai-rules

Integrates Firebase AI Logic into Flutter apps. Use when setting up the firebase_ai plugin, calling Gemini models, handling AI service errors, or applying security and privacy considerations for AI features.