Class XuiApplication
public class XuiApplication : Application, IComponentCallbacks2, IComponentCallbacks, IJavaObject, IJavaPeerable, IDisposable, IRunLoop
- Inheritance
-
XuiApplication
- Implements
- Inherited Members
Constructors
XuiApplication(nint, JniHandleOwnership)
public XuiApplication(nint handle, JniHandleOwnership ownership)
Parameters
handlenintownershipJniHandleOwnership
Properties
Abstract
public Application? Abstract { get; }
Property Value
Instance
public static XuiApplication? Instance { get; }
Property Value
Methods
OnCreate()
Called when the application is starting, before any activity, service, or receiver objects (excluding content providers) have been created.
public override void OnCreate()
Remarks
Called when the application is starting, before any activity, service, or receiver objects (excluding content providers) have been created.
Implementations should be as quick as possible (for example using lazy initialization of state) since the time spent in this function directly impacts the performance of starting the first activity, service, or receiver in a process.
If you override this method, be sure to call super.onCreate().
Be aware that direct boot may also affect callback order on
Android android.os.Build.VERSION_CODES#N and later devices.
Until the user unlocks the device, only direct boot aware components are
allowed to run. You should consider that all direct boot unaware
components, including such android.content.ContentProvider, are
disabled until user unlock happens, especially when component callback
order matters.
.
android.app.Application.onCreate()
Portions of this page are modifications based on work created and shared by the
OnLowMemory()
This is called when the overall system is running low on memory, and actively running processes should trim their memory usage.
public override void OnLowMemory()
Remarks
Portions of this page are modifications based on work created and shared by the
OnTerminate()
This method is for use in emulated process environments.
public override void OnTerminate()
Remarks
This method is for use in emulated process environments. It will never be called on a production Android device, where processes are removed by simply killing them; no user code (including this callback) is executed when doing so.
.
android.app.Application.onTerminate()
Portions of this page are modifications based on work created and shared by the
OnTrimMemory(TrimMemory)
Called when the operating system has determined that it is a good time for a process to trim unneeded memory from its process.
public override void OnTrimMemory(TrimMemory level)
Parameters
levelTrimMemoryThe context of the trim, giving a hint of the amount of trimming the application may like to perform. May be TrimMemoryComplete, TrimMemoryModerate, TrimMemoryBackground, TrimMemoryUiHidden, TrimMemoryRunningCritical, TrimMemoryRunningLow, or TrimMemoryRunningModerate.
Remarks
Portions of this page are modifications based on work created and shared by the
Quit()
Requests that the run loop exit gracefully. On platforms with a definite exit (Win32, macOS) this posts a quit message to the main thread. On platforms without a run loop (iOS, Browser) this is a no-op.
public void Quit()
Run()
Starts the main run loop for the application. This method may block until the application terminates or exits naturally. On platforms with built-in UI event loops (e.g., iOS, Android), this method may return immediately after bootstrapping the application delegate.
public int Run()
Returns
- int
The application’s exit code.