-
Notifications
You must be signed in to change notification settings - Fork 50
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
Call ANativeActivity_finish()
or GameActivity_finish()
when android_main
returns
#67
Comments
We weren't really sure how to deal with this in Perhaps this is different for |
Thanks, I vaguely recall reading those issues at some point but good to join the dots for the extra context. I'm fairly sure that
android-activity/android-activity/src/lib.rs Lines 38 to 49 in 36ddfaa
android_main gets run in its own thread.
If some application didn't want to run its looper within that Just double checking this, I see that the android-activity/android-activity/src/lib.rs Lines 531 to 534 in 36ddfaa
|
(Edited your message to include the full referenced doc-comment lines in-line 🙂) Indeed, we may have been wrong in assuming for and allowing the thread-spawn. Good to have the back-link to check our ideas, but at this point I'd say to go for it and call |
Calling Activity.finish() is what ensures the Activity will get gracefully destroyed, including calling the Activity's onDestroy method. Fixes: rust-mobile#67
Calling Activity.finish() is what ensures the Activity will get gracefully destroyed, including calling the Activity's onDestroy method. Fixes: rust-mobile#67
Calling Activity.finish() is what ensures the Activity will get gracefully destroyed, including calling the Activity's onDestroy method. Fixes: #67
Additionally, expose an
AndroidApp::finish()
API that can be used to explicitly call theActivity::finish()
method which will lead to the activity being stopped and destroyed (with a correspondingDestroy
event)The text was updated successfully, but these errors were encountered: