Skip to content

MainActivity launchMode is singleTask#27373

Closed
dulmandakh wants to merge 2 commits into
facebook:masterfrom
dulmandakh:lauchmode-singletask
Closed

MainActivity launchMode is singleTask#27373
dulmandakh wants to merge 2 commits into
facebook:masterfrom
dulmandakh:lauchmode-singletask

Conversation

@dulmandakh
Copy link
Copy Markdown
Contributor

Summary

Most RN apps have single activity, and developers expect to resume application from background when app icon pressed. But Android default configuration creates a new activity instance, which confuses developers, see #27370 and #27368.

This PR changes template manifest so that when app icon pressed, background app will resume instead of creating a new activity, therefore match developers expectations. Also it's required to make Linking work.

Changelog

[Android] [Changed] - MainActivity launchMode is singleTask

Test Plan

RNTester will resume background app, instead of creating a new instance when app icon pressed

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 30, 2019
@dulmandakh dulmandakh requested a review from mdvacca November 30, 2019 01:49
@facebook-github-bot facebook-github-bot added the Contributor A React Native contributor. label Nov 30, 2019
Copy link
Copy Markdown
Contributor

@mdvacca mdvacca left a comment

Choose a reason for hiding this comment

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

LGTM

@react-native-bot react-native-bot added the Platform: Android Android applications. label Nov 30, 2019
Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@mdvacca is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @dulmandakh in 7a42596.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Merged This PR has been merged. Platform: Android Android applications.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants