Exiting the app
When the function tagged with #[ndk_glue::main] returns, the app hangs, unless ndk_glue::native_activity().finish() is called just before. Should the ndk_glue::main append ndk_glue::native_activity().finish() at the end of the function?
@zarik5 Thanks for reporting! I have definitely been thinking about calling it after fn main():
https://github.com/rust-windowing/android-ndk-rs/blob/49e8ed51220567dccac9fd1e8baa526e9cdac163/ndk-glue/src/lib.rs#L183-L202
We can perform and publish this as a breaking change as it might potentially break an application that spawns its own thread while accidentally returning from fn main() when the app (and looper etc) is still very much alive.
We've had quite the discussion in #160 and automatically calling .finish() upon returning from fn main() seems undesirable at best; applications will have to call it themselves.
I'll think about how to best resolve this issue; probably by updating some examples and documentation to explicitly call this function.
closing for now, please reopen in https://github.com/rust-mobile/android-activity if still relevant