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

How can I handle split-screen mode on Android? #4944

Closed
mileskrell opened this issue Jul 13, 2019 · 5 comments
Closed

How can I handle split-screen mode on Android? #4944

mileskrell opened this issue Jul 13, 2019 · 5 comments
Labels
Android home The user interface for the generic development client

Comments

@mileskrell
Copy link

When running an app on Android in the Expo client app, if I put the app into split-screen mode, it restarts.

How can I keep this from happening?

@cruzach cruzach added the home The user interface for the generic development client label Jul 15, 2019
@cruzach
Copy link
Contributor

cruzach commented Jul 17, 2019

Hey @mileskrell - is this on all Android devices? Does the behavior still happen on simulators?

@mileskrell
Copy link
Author

mileskrell commented Jul 17, 2019

@cruzach - I'm totally new to both React Native and Expo, and since opening this issue I've realized that a lack of good support for Android's configuration changes is just an issue with React Native more generally - it's not specific to Expo. So this probably wasn't the right place for me to open this issue.

But yes, I'm seeing this behavior on Appetize previews at https://snack.expo.io, as well as at least one other emulator (Pixel 2, API 27) and one physical device (Moto G6, API 26).

@christianjuth
Copy link
Contributor

@cruzach I am seeing the same issue. I thought it might only be in the Expo client app, so I tried installing a standalone apk build on an emulator. App restarts as soon as you put it in split-screen. All previous state is lost.

Notes:

  • Pixel 2 Emulator running android Q
  • Testing on MacOS Mojave
  • My app is using Expo SDK 34
  • App was built on Expo server using expo build:android and installed using adb install
  • I have not tried installing my Expo app through the Play Store. I will try this soon, but I'm guessing it won't make a difference.
  • I have not had a chance to test this using a physical device

@cruzach
Copy link
Contributor

cruzach commented Sep 3, 2019

@christianjuth have you tried a bare RN app? as Miles pointed out, this may not be an issue specific to Expo

@cruzach
Copy link
Contributor

cruzach commented Jul 22, 2020

The answer to handling this situation properly is provided here. To make those changes to AndroidManifest.xml, you'll ned to use the bare workflow, since you don't have access to that level of customization in the managed workflow

@cruzach cruzach closed this as completed Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android home The user interface for the generic development client
Projects
None yet
Development

No branches or pull requests

3 participants