-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Bevy cannot run in the background on Android #9057
Comments
Android destroys all active gl/vulkan surfaces when an app is suspended. |
at the moment this is handled by just closing the app whenever it's suspended bevy/crates/bevy_winit/src/lib.rs Lines 663 to 674 in b88ff15
this is not a bug but rather an unimplemented feature. |
Summarizing some investigation into this: it appears to require fixes upstream in winit. Bevy needs to receive and handle both the Related issues: rust-windowing/winit#2736, rust-windowing/winit#2337 |
Why is stop evt required to fix this if surface gets destroyed after pause? |
@mockersf is this issue complete? If not, what's left? |
I believe this is finished: feel free to open new issues for remaining problems. |
It's not complete at all, we're unable to run in background |
To run in background, we need to be able to run the main app while skipping part of the rendering app. We can't interact with the GPU in the background, but we need to not miss events to change rendering assets and play them when the app comes back in the foreground |
Any progress? |
Bevy version
main (b61397e) and latest release (0.11.2)
What you did
Run the android example on a real device (Samsung Galaxy S10+). Now press the home button to minimize the app, then open it back up.
What went wrong
The App quits (at least logs do not indicate a crash) and will start from the beginning when reopened.
Additional information
This is a known problem (see some general discussion about life cycle handling in #86), but I couldn't find an open issue for it.
The text was updated successfully, but these errors were encountered: