Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds manual app activation functionality to the Facebook App Events plugin, allowing developers to manually trigger app activation events when automatic logging is disabled (e.g., for GDPR compliance). The implementation provides a new activateApp() method with optional application ID override support.
Key changes:
- New
activateApp()method in the Dart API with optionalapplicationIdparameter - Platform-specific implementations for both iOS and Android
- Test coverage for the new functionality
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/facebook_app_events.dart | Adds the activateApp() method with documentation explaining when and how to use manual activation |
| test/facebook_app_events_test.dart | Adds test cases to verify the method correctly handles null and provided applicationId parameters |
| ios/facebook_app_events/Sources/facebook_app_events/FacebookAppEventsPlugin.swift | Implements iOS handler that sets logging override app ID when provided and calls SDK's activateApp() |
| android/src/main/kotlin/id/oddbit/flutter/facebook_app_events/FacebookAppEventsPlugin.kt | Implements Android handler with null safety checks and calls SDK's activateApp() with optional applicationId |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
antonoddbit
approved these changes
Dec 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Made some updates to #466 to improve stability and consistency.
Using
ActivityAwarehere makesactivateAppdepend on the Activity lifecycle, so the call can fail if it happens before an Activity is attached (startup ordering/background contexts), even though anApplicationis already available. Grabbing theApplicationfrom the engine’sapplicationContextinonAttachedToEnginematches the SDK’s intended usage (callable fromApplication.onCreatewhen auto logging is disabled) and makesactivateAppmore robust/reliable because it no longer relies on Activity attach/detach timing.