Skip to content

Event listener is not fired when including android's back button during navigation between two apps #19711

Closed
@Brynjulf

Description

@Brynjulf

Environment

Environment:
OS: macOS High Sierra 10.13.5
Node: 8.9.0
Yarn: 1.3.2
npm: 6.1.0
Watchman: 4.9.0
Xcode: Xcode 9.4 Build version 9F1027a
Android Studio: 3.1 AI-173.4720617

Packages: (wanted => installed)
react: 16.0.0-beta.5 => 16.0.0-beta.5
react-native: ^0.55.4 => 0.55.4

Description

After successfully navigating from App1 to App2, and then moving back to App1 using Android's back button the url event listener does not fire. This causes problems when attempting to navigate to App2 again

componentDidMount() {
    Linking.addEventListener('url', this.handleOpenURL);
}

handleOpenURL(event) {
    store.dispatch(actions.linkingHandleUrl({ url: event.url }));
}

Steps to Reproduce

  • Navigate to App2
  • Go back to App1 using android's back button
  • Navigate to App2 again

Expected Behavior

Url event to still fire despite using android's back button as a part of the navigation

Actual Behavior

Event did not fire after using android's back button as a part of the navigation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: AndroidAndroid applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions