-
Notifications
You must be signed in to change notification settings - Fork 625
Implement collectAndSendFeedback() #3816
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
Conversation
bdb53b8
to
6d5b7d1
Compare
Coverage Report 1Affected Products
Test Logs
Notes |
The public api surface has changed for the subproject firebase-appdistribution-api: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
6d5b7d1
to
51c8604
Compare
The public api surface has changed for the subproject firebase-appdistribution-api: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
Size Report 1Affected Products
Test Logs
Notes |
The public api surface has changed for the subproject firebase-appdistribution-api: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
...tion/src/main/java/com/google/firebase/appdistribution/impl/FirebaseAppDistributionImpl.java
Show resolved
Hide resolved
@@ -46,23 +46,39 @@ public class FirebaseAppDistributionRegistrar implements ComponentRegistrar { | |||
Component.builder(FirebaseAppDistribution.class) | |||
.add(Dependency.required(FirebaseApp.class)) | |||
.add(Dependency.requiredProvider(FirebaseInstallationsApi.class)) | |||
.add(Dependency.required(FeedbackSender.class)) |
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.
Is component registry intended as a general purpose dependency injection framework?
If so, why use it just for FeedbackSender
and not for things like FirebaseAppDistributionTesterApiClient
, ReleaseIdentifier
, etc.?
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.
It's not. In this case the FeedbackActivity needs to get an instance of the class, which depends on a Provider and thus needs to be instantiated by the Firebase Components framework.
Not sure if this is the best way to do this though. I'll reach out to the ACore folks.
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.
why does FirebaseAppDistribution actually depend on FeedbackSender? I don't see it used inside buildFirebaseAppDistribution
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.
I was thinking that this captures the dependency that FeedbackActivity (launched by FirebaseAppDistribution) has on FeedbackSender... (EDIT: thinking more now I guess that doesn't make sense, disregard)
|
||
/** Take a screenshot of the running host app. */ | ||
Task<Bitmap> takeScreenshot() { | ||
// TODO(lkellogg): Actually take a screenshot |
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.
Seems pretty straightforward, but you need an Activity
or a View
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.
Nice! We can get an activity using FirebaseAppDistributionActivityLifecycleNotifier.applyToForegroundActivity().
TODO: shorten the name of that class :)
I think we can add that in a followup.
...src/main/java/com/google/firebase/appdistribution/impl/FirebaseAppDistributionRegistrar.java
Show resolved
Hide resolved
861b763
to
05d4642
Compare
this.testerApiClient = testerApiClient; | ||
} | ||
|
||
@NonNull |
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.
I noticed you removed this annotation in UpdateProgress. How do you decide it's needed here?
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.
It wasn't needed in UpdateProgress because those return types (long) were not nullable.
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.
Actually I don't think this is necessary either. In this case it's because this is not a publicly exposed API. I'll remove it.
@@ -0,0 +1,52 @@ | |||
<?xml version="1.0" encoding="utf-8"?> |
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.
Is this file generated somehow?
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.
No I built this. It's a very basic prototype UI. You can see it in the screencast in the PR description.
The following files are not formatted properly: |
/test smoke-tests |
Adds
FeedbackSender
as a new Component, so that it can be accessed by the FeedbackActivity.Screencast (submit fails because the upload URL mapping has not rolled out to GFE yet): https://screencast.googleplex.com/cast/NTQ2NDIyNjkzNzE3NjA2NHw0M2YwNjUxYS03Nw