Skip to content
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

[Fix] groupless heads-up style notifications from redisplaying previous #1603

Merged
merged 2 commits into from
Jun 21, 2022

Conversation

jkasten2
Copy link
Member

@jkasten2 jkasten2 commented Jun 19, 2022

Description

One Line Summary

Fix bug where if a 4th, 5th, etc notification was displayed with the heads-up style and no group was set the previous notifications would re-display.

Details

Motivation

This bug can be confusing to end users and creates a lot of visual noise with old notification reshowing as heads-up.

Scope

Only effects notification display when no group is used, and 4 or more are displayed for the app. Effects Android 7.0 and newer.

Testing

Unit testing

None, Robolectric does not simulate this specific detail.

Manual testing

Tested on an Android 11 emulator, ensuring I could reproduce the issue and the issue no longer happens after the fix.

Videos

Before Fix

Android_Groupless_notication_redisplay_bug-captured_Android11_emu.mp4

After Fix

Android_Groupless_notification_bug_fixed_with_setOnlyAlertOnce-Android11_emu.mp4

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

This change is Reviewable

Fix issue where if notifications were shown as heads-up style and a 4th
notification is displayed all previous notifications would show again.

We need to regenerate these notifications to attach a group but we
didn't use setOnlyAlertOnce(true) to prevent showing as heads up again.
assignGrouplessNotifications is only ever needed for Android 7.0 (N) and
higher so bumped this requirement.
Also the Android 6.0 (M) implementation was incomplete, it never
assigned anything from the old notification.
@jkasten2 jkasten2 requested review from nan-li and emawby June 19, 2022 22:34
@jkasten2 jkasten2 merged commit cfa20cc into main Jun 21, 2022
@jkasten2 jkasten2 deleted the fix/groupless_heads_up_redisplay branch June 21, 2022 18:35
@jkasten2 jkasten2 mentioned this pull request Jun 21, 2022
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.

2 participants