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

[Change] Notification Activity Trampoline forward instead of reverse #1581

Commits on May 14, 2022

  1. rm all the reverse bits from Activity Trampolining

    This commit focuses on removing all logic that setups up multiple
    Activities and flags to build a "Reverse Activity Trampoline".
    
    This is Part 1 of required changes, this commit results in the app not
    opening, resuming, or opening launch URLs, the behavior of the click
    being tracked is still working via the invisible
    NotificationOpenedReceiver Activity. This gives us a clean starting
    state for the next commit where we we will add logic to the notification
    open event to Activity Trampoline forward to the intended Activity.
    jkasten2 committed May 14, 2022
    Configuration menu
    Copy the full SHA
    7f76298 View commit details
    Browse the repository at this point in the history
  2. add back forward activity trampolining

    Now everything uses the same forward activity trampolining behavior so
    everything works consistently!, including the behavior of HMS message
    type notifications.
    
    Removed the startLauncherActivity flag from handleNotificationOpen due
    this consistently as well. Renamed startOrResumeApp to
    openDestinationActivity as this now handles URL opens as well. There
    was a bug here where HMS notifications did not open launch URLs that has
    also been fixed here.
    Added logging if we don't open an Activity, to indicate the behavior was
    intended.
    jkasten2 committed May 14, 2022
    Configuration menu
    Copy the full SHA
    324f5e9 View commit details
    Browse the repository at this point in the history
  3. Separate notification generate from open logic

    GenerateNotificationOpenIntent used to handle everything related to
    Intents for notifications since it had to create the full reverse
    Activity trampoline and attach it to the notification. Now the
    notification generation logic simply needs to always open the SDK's
    invisible click tracking Activity. When the notification is open the
    runtime logic will take the push payload into consideration to
    trampoline to the destination Activity.
    jkasten2 committed May 14, 2022
    Configuration menu
    Copy the full SHA
    4c01f3e View commit details
    Browse the repository at this point in the history
  4. Reverting activity trampolining tests

    While this commit isn't a git revert most of the changes are undoing the
    following commit:
    5f72750
    
    Additionally this fixes tests due to the dropped activity param from
    OneSignal_handleNotificationOpen.
    jkasten2 committed May 14, 2022
    Configuration menu
    Copy the full SHA
    6b069db View commit details
    Browse the repository at this point in the history
  5. Fix foregrounding app on IAM preview open

    Added extra foreground assert to existing test to ensure it fails.
    Added missing openDestinationActivity call for IAM notification handling
    and ensured test passed.
    Moved logic from NotificationOpenProcessor.handleIAMPreviewOpen
    into OSInAppMessagePreviewHandler.notificationOpened
    Remaned inAppMessagePreviewHandled to notificationReceived so
    it is more clear now that
    OSInAppMessagePreviewHandler handles both opens and received pushes.
    jkasten2 committed May 14, 2022
    Configuration menu
    Copy the full SHA
    1c3e69e View commit details
    Browse the repository at this point in the history