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

AppRegistry.registerComponent componentProvider call more than once #27368

Closed
obstrux opened this issue Nov 29, 2019 · 2 comments
Closed

AppRegistry.registerComponent componentProvider call more than once #27368

obstrux opened this issue Nov 29, 2019 · 2 comments
Labels
API: AppRegistry Bug Resolution: Locked This issue was locked by the bot.

Comments

@obstrux
Copy link

obstrux commented Nov 29, 2019

Android devices

React Native version: 0.59.9

Steps To Reproduce

  1. first installed and open, then press home button
  2. when app from background to foreground, the method 【run】will call again,

image

@dulmandakh
Copy link
Contributor

Please see #27370

@obstrux
Copy link
Author

obstrux commented Nov 29, 2019

thank you😁

facebook-github-bot pushed a commit that referenced this issue Dec 2, 2019
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
Pull Request resolved: #27373

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

Differential Revision: D18766373

Pulled By: mdvacca

fbshipit-source-id: 697e9c5bf92ec958de265b060dffb50f7b74d157
@facebook facebook locked as resolved and limited conversation to collaborators Oct 2, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API: AppRegistry Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants