How to handle mobile application lifecycle (Resumed, Paused, Destroyed...)? #14234
Unanswered
alessandrofrancesconi
asked this question in
Q&A
Replies: 2 comments 2 replies
-
You have access to the Android Activity and iOS UIApplicationDelegate - you can use the same APIs to handle these events and call your services/viewmodels to handle them. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Upd. In 11.1 we have some basic common events that can be handled for app activation/deactivation: https://docs.avaloniaui.net/docs/concepts/services/activatable-lifetime |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm building a cross-platform Android / iOS app using Avalonia 11.
I need to know when the app goes in background (e.g. on Android, when the user clicks the "menu" button, or locks the device).
For Android, the application events are documented here: https://developer.android.com/guide/components/activities/activity-lifecycle
For iOS: https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle
How to handle these events for both the platforms, on Avalonia?
Beta Was this translation helpful? Give feedback.
All reactions