Can I keep a thread alive on android? #637
Unanswered
UnbelievableWang
asked this question in
Q&A
Replies: 1 comment 2 replies
-
My suspicion is that the thread object is being garbage collected because it is passing out of scope when the handler completes. If you maintain a reference to the thread object outside the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I need to keep a thread alive after I press a button,but the thread will be killed on android.
It works well on windows.
My code:
I used
adb logcat -s MainActivity:* stdio:* Python:*
to check if the thread is working.When I enabled
time.sleep(1999)
, it prints logs .But the whole app is enabled.Beta Was this translation helpful? Give feedback.
All reactions