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

Revert "Change Android's MainActivity launchMode to singleTop" #4397

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

haileyok
Copy link
Contributor

@haileyok haileyok commented Jun 6, 2024

Reverts #4255

Why

When using share intents, this change introduces a problem where multiple instances of the app are opened. This is pretty risky in regards to file system writes or session management. Let's revert.

Reverting does re-introduce the problem found here: #4212. We should investigate this possibly through the expo-web-browser library itself.

Test Plan

Build after this revert, then open the app through a share intent (for example, through the Photos app). Multiple process shouldn't be open.

Copy link

render bot commented Jun 6, 2024

with:
path: most-recent-testflight-commit.txt
key: most-recent-testflight-commit

- name: ✏️ Write commit hash to cache
if: ${{ inputs.channel != 'testflight' && inputs.channel != 'production' }}
if: ${{ inputs.channel == 'testflight' }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

we don't need to revert this part right

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

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

need to undo unrelated file

Copy link

github-actions bot commented Jun 6, 2024

Old size New size Diff
7.39 MB 7.39 MB 0 B (0.00%)

@gaearon gaearon merged commit 094c08e into main Jun 6, 2024
6 checks passed
@gaearon gaearon deleted the revert-4255-android-activity-launchmode branch June 6, 2024 18:08
@fobos531
Copy link

Hey @haileyok , sorry to revive this - I was wondering whether you tried the solution provided here? (which would apparently support both cases) expo/expo#29153 (comment)

This seems to be a known issue in react native apps, spanning functionalities such as deep linking, android webviews and 3d payments.

References:

expo/expo#29153
proyecto26/react-native-inappbrowser#213
stripe/stripe-react-native#355 (comment)
auth0/react-native-auth0#944

@gaearon
Copy link
Collaborator

gaearon commented Dec 14, 2024

Feel free to send a PR and we can have a look. Please include note on testing against past regressions this change has caused.

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.

3 participants