Skip to content

Conversation

@briemcnally
Copy link
Contributor

NOTE: Changes were migrated from PR #26 to update SNAPSHOT and prep for release.

Changes:
Segment’s documentation mentions that screen events are not passed through to the Firebase SDK because Firebase does automatic screen tracking. (https://segment.com/docs/connections/destinations/catalog/firebase/#screen)
However, it mentions that Automatic+Manual screen tracking should be supported, but this currently does not work because Segment does not forward the manual screen tracking events.

Like on iOS, this attempts to let explicitly tracked screens in analytics-react-native using analytics.screen actually be tracked in Firebase.

I haven't been able to test this code locally, since I'm not very familiar with Gradle, and how to get a locally edited version of this to run in my project, but I'm opening this in any case as an example of a matching implementation of an iOS fix - and hoping someone knows how to test this, or can think of an alternative implementation ✌️

@briemcnally briemcnally requested a review from brennan February 20, 2020 22:01
public void onActivityStopped(Activity activity) {
super.onActivityStopped(activity);

this.currentActivity = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this here will refer to onActivityStopped rather than FirebaseIntegration, which I think is what you actually want.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brennan I added integration.onActivityStopped(activity); after the integration.onActivityStarted(activity) in the unit tests locally to inspect the values. Looks like this is referring to FirebaseIntegration:
Screen Shot 2020-02-20 at 2 24 16 PM

Screen Shot 2020-02-20 at 2 24 04 PM

@briemcnally briemcnally merged commit c4d7097 into master Feb 21, 2020
@brennan brennan deleted the pr/26 branch July 7, 2020 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants