Skip to content

NativeActivity is destroyed when a USB device is attached or detached. #2055

Discussion options

You must be logged in to vote

So I decided to try the ndk samples to see if they were affected too, turns out they weren't so it was clear I was doing something wrong. It turns out I was confused on what destroyRequested is supposed to signal and thought the android_main function will only be called once by the NativeActivity, so I never let the app thread exit when it should have. In hindsight it makes total sense that android_main will be called every time the NativeActivity is destroyed and remade.

Thank you for taking the time to reply.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@IllusionMan1212
Comment options

@IllusionMan1212
Comment options

Answer selected by IllusionMan1212
@DanAlbert
Comment options

Comment options

You must be logged in to vote
3 replies
@IllusionMan1212
Comment options

@enh-google
Comment options

@IllusionMan1212
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants