-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Added support for detecting app focus events. #69
Conversation
As it says at https://developer.android.com/reference/android/app/Activity#onWindowFocusChanged(boolean):
So I think |
Also, now that I remind myself of how this works, there's no need to add any methods to IPythonApp, because MainActivity doesn't use it anymore. Instead, |
These events are only triggered when the app state changes between They do not take the input focus into account when the app is Hence,
Moreover, as per: https://source.android.com/docs/core/display/multi_display/multi-resume , multiple apps can be in Resumed state, and Although, I do agree with you that |
According to: https://developer.android.com/reference/android/app/Activity#onWindowFocusChanged(boolean)
Hence, I have chosen: On platform versions prior to Build.VERSION_CODES.Q, I have implemented the feature with |
Added support for detecting app focus events through:
onWindowFocusChanged
https://developer.android.com/reference/android/view/ViewTreeObserver.OnWindowFocusChangeListener#onWindowFocusChanged(boolean)This PR relates to the PR: beeware/toga#2096
PR Checklist: