New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(firebase_analytics): retrieves appInstanceId
property on native platforms if available
#8689
feat(firebase_analytics): retrieves appInstanceId
property on native platforms if available
#8689
Conversation
71ba672
to
c7a2ccc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @willbryant, nice work! Couple of things I'd like to see, please:
- Could you add another mock test for the platform interface here?
- Do you mind updating the java implementation to use the TaskCompletionSource like
the example linked?
Thanks! 😄
Thanks for the code review @russellwheatley! I'll wait till your PR is merged and rebase, so I don't create a merge conflict. Just to understand the second point, do we still need to use a TaskCompletionSource when we already have a Task? I think I'd need to Tasks.await to get the value out of that Task to pass to taskCompletionSource.setResult? |
@willbryant, yes, for consistency and to use the taskCompletionSource.setResult(Tasks.await(analytics.getAppInstanceId())); |
c7a2ccc
to
9641aee
Compare
Cool, that's basically what I did. I added a try/finally for consistency with the others. |
8a26bb0
to
320ddbd
Compare
...roid/src/main/java/io/flutter/plugins/firebase/analytics/FlutterFirebaseAnalyticsPlugin.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @willbryant, do you mind also updating analytics web so that it throws this exception, please?
d17210f
to
1ec2913
Compare
Done, and squashed. |
1ec2913
to
d4c32ca
Compare
Hey @willbryant, do you mind also adding an e2e test to analytics if possible? 😄 |
Hey @willbryant. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
aced8b2
to
2a0226c
Compare
@russellwheatley I can't get e2e tests to run for the life of me, but I've pushed a draft, if you wouldn't mind approving a CI run. |
2a0226c
to
7d3380a
Compare
7d3380a
to
8c96ebf
Compare
Struggling a bit without CI access, can't get the main e2e test directory to run locally. But, I discovered there's a sort of second copy under example/ in the plugin itself, which showed the same issue, so using that I made a bit more progress. Hopefully the next run works better. |
@willbryant run Some of the e2e's need the emulators running to work (e.g. firebase_database) so maybe that was your problem. I'm also presuming you've ran |
ahh, you'll have to run |
This value is needed to send server-side events through the Measurement Protocol as a part of the same session, and also useful for debugging to pair up with the data visible in DebugView and BigQuery.
8c96ebf
to
484fa96
Compare
Hopefully that's it, thanks for your help :). |
appInstanceId
property on native platforms if available
Add an appInstanceId property on FirebaseAnalytics, exporting the API from the underlying native Firebase library implementations.
Description
This value is needed to send server-side events through the Measurement Protocol as a part of the same session, and also useful for debugging to pair up with the data visible in DebugView and BigQuery.
Related Issues
Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR. Note that you'll have to prefix the issue numbers with flutter/flutter#.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
).This will ensure a smooth and quick review process. Updating the
pubspec.yaml
and changelogs is not required.///
).melos run analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?