Skip to content

Notifications: Ask permission upfront, show only one persistent notification #4179

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

Merged
merged 5 commits into from
Oct 7, 2022

Conversation

kaibolay
Copy link
Contributor

@kaibolay kaibolay commented Oct 6, 2022

No description provided.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 6, 2022

Coverage Report 1

Affected Products

  • firebase-appdistribution

    Overall coverage changed from ? (4d64675) to 78.24% (24f44b1) by ?.

    39 individual files with coverage change

    FilenameBase (4d64675)Merge (24f44b1)Diff
    AabUpdater.java?98.68%?
    ApkInstaller.java?96.88%?
    ApkUpdater.java?93.75%?
    AppDistributionReleaseImpl.java?100.00%?
    AppDistributionReleaseInternal.java?100.00%?
    AppIconSource.java?85.71%?
    AutoValue_AppDistributionReleaseImpl.java?65.45%?
    AutoValue_AppDistributionReleaseInternal.java?66.67%?
    AutoValue_ImageUtils_ImageSize.java?35.00%?
    AutoValue_TesterApiDisabledErrorDetails.java?29.41%?
    AutoValue_TesterApiDisabledErrorDetails_HelpLink.java?54.17%?
    AutoValue_UpdateProgressImpl.java?65.96%?
    ErrorMessages.java?0.00%?
    FeedbackActivity.java?1.89%?
    FeedbackSender.java?90.91%?
    FirebaseAppDistributionExceptions.java?80.00%?
    FirebaseAppDistributionFileProvider.java?0.00%?
    FirebaseAppDistributionImpl.java?94.42%?
    FirebaseAppDistributionLifecycleNotifier.java?98.00%?
    FirebaseAppDistributionNotificationsManager.java?80.00%?
    FirebaseAppDistributionRegistrar.java?81.58%?
    FirebaseAppDistributionTesterApiClient.java?87.63%?
    HttpsUrlConnectionFactory.java?50.00%?
    ImageUtils.java?96.00%?
    InstallActivity.java?2.53%?
    LogWrapper.java?62.50%?
    NewReleaseFetcher.java?77.55%?
    PackageInfoUtils.java?42.86%?
    ReleaseIdentifier.java?88.00%?
    ReleaseUtils.java?83.33%?
    ScreenshotTaker.java?66.67%?
    SignInResultActivity.java?0.00%?
    SignInStorage.java?42.86%?
    TaskUtils.java?96.30%?
    TesterApiDisabledErrorDetails.java?93.75%?
    TesterApiHttpClient.java?89.47%?
    TesterSignInManager.java?93.62%?
    UpdateProgressImpl.java?100.00%?
    UpdateTaskImpl.java?75.71%?

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/ScGTt0cHtM.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 6, 2022

Copy link
Contributor

@lfkellogg lfkellogg left a comment

Choose a reason for hiding this comment

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

This looks great and works well for our test app so I think we should submit this as is. That said I just want to call out that I think when we move this to the SDK we could combine initialize, requestPermission, and enable into one call, and maybe even remove disable:

  • initialize() needed to be called in the Application.onCreate() so we'd be able to hook into the Activity.onCreate() using lifecycle callbacks. But that's not necessary anymore now that we're telling them to call requestPermission() in the Activity.onCreate(). We can just combine the two.
  • enable() can probably also be combined into the same method. Our test app wants the ability to toggle this on and off but I don't see that being super useful in a real app. They probably just want to either enable it or not when the app starts. Also if they're requesting the permission they probably just want to go ahead and enable it.
  • For the same reason, I think we can consider removing disable()

*
* @param activity the [Activity] object
*/
@RequiresApi(Build.VERSION_CODES.TIRAMISU)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@kaibolay
Copy link
Contributor Author

kaibolay commented Oct 7, 2022

This looks great and works well for our test app so I think we should submit this as is. That said I just want to call out that I think when we move this to the SDK we could combine initialize, requestPermission, and enable into one call, and maybe even remove disable [...]

Makes sense!

@kaibolay kaibolay closed this Oct 7, 2022
@kaibolay kaibolay reopened this Oct 7, 2022
@kaibolay kaibolay merged commit 7c5d077 into fad/in-app-feedback Oct 7, 2022
@kaibolay kaibolay deleted the kb/simpler-permissions branch October 7, 2022 13:35
@firebase firebase locked and limited conversation to collaborators Nov 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants