Class CoreApplication
Definition
- Namespace:
- Tizen.Applications
- Assembly:
- Tizen.Applications.Common.dll
The CoreApplication class provides functionality to manage application lifecycle events that are controlled by the backend system.
C#Copypublic class CoreApplication : Application, IDisposable
- Inheritance
- Derived
- Implements
-
System.IDisposable
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
Constructors
CoreApplication(ICoreBackend)
Initializes the CoreApplication class by providing a specific implementation of the ICoreBackend interface.
Declaration
C#Copypublic CoreApplication(ICoreBackend backend)
Parameters
Type | Name | Description |
---|---|---|
ICoreBackend | backend | An instance of the desired implementation of the ICoreBackend interface. |
Remarks
The CoreApplication class provides access to various features and functionalities related to application management. By initializing the CoreApplication class with a specific implementation of the ICoreBackend interface, developers can customize the behavior and functionality of their applications based on their requirements. It enables them to extend the capabilities of the default CoreApplication class and tailor it according to their needs.
Properties
Declaration
C#Copyprotected ICoreBackend Backend { get; }
Property Value
Type | Description |
---|---|
ICoreBackend |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
Methods
Dispose(bool)
Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
Declaration
C#Copyprotected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | If true, disposes any disposable objects. If false, does not dispose disposable objects. |
Overrides
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
Declaration
C#Copypublic override void Exit()
Overrides
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
OnAppControlReceived(AppControlReceivedEventArgs)
Override this method to customize the behavior when the application receives the appcontrol message. If base.OnAppControlReceived() is not called, the event 'AppControlReceived' will not be triggered.
Declaration
C#Copyprotected virtual void OnAppControlReceived(AppControlReceivedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
AppControlReceivedEventArgs | e | The arguments passed in the appcontrol message |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
OnCreate()
Overrides this method if you want to handle specific behavior when the application is created. Calling base.OnCreate() ensures that the default implementation is executed before any custom code in this method. If base.OnCreate() is not called, the event 'Created' will not be emitted.
Declaration
C#Copyprotected virtual void OnCreate()
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
OnDeviceOrientationChanged(DeviceOrientationEventArgs)
Override this method to define specific behavior when the device orientation changes. If base.OnDeviceOrientationChanged() is not called, the 'DeviceOrientationChanged' event will not be raised.
Declaration
C#Copyprotected virtual void OnDeviceOrientationChanged(DeviceOrientationEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DeviceOrientationEventArgs | e | The arguments for the device orientation change event |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
OnLocaleChanged(LocaleChangedEventArgs)
Override this method to handle changes in the system language. If base.OnLocaleChanged() is not called, the LocaleChanged event will not be triggered.
Declaration
C#Copyprotected virtual void OnLocaleChanged(LocaleChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
LocaleChangedEventArgs | e | The arguments passed with the LocaleChanged event |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
OnLowBattery(LowBatteryEventArgs)
Override this method to handle the behavior when the system battery level drops. If base.OnLowBattery() is not called, the LowBattery event will not be raised.
Declaration
C#Copyprotected virtual void OnLowBattery(LowBatteryEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
LowBatteryEventArgs | e | The arguments for the low battery event |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
OnLowMemory(LowMemoryEventArgs)
Override this method to handle behavior when the system memory is low. Calling base.OnLowMemory() ensures that the 'LowMemory' event is emitted.
Declaration
C#Copyprotected virtual void OnLowMemory(LowMemoryEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
LowMemoryEventArgs | e | The low memory event argument |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
OnRegionFormatChanged(RegionFormatChangedEventArgs)
Override this method to handle changes in the region format. Make sure to call base.OnRegionFormatChanged() to ensure that the RegionFormatChanged event is raised.
Declaration
C#Copyprotected virtual void OnRegionFormatChanged(RegionFormatChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
RegionFormatChangedEventArgs | e | The region format changed event arguments |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
OnTerminate()
Override this method to define specific actions that occur when the application terminates. Calling base.OnTerminate() ensures that the default termination process takes place and the 'Terminated' event is emitted.
Declaration
C#Copyprotected virtual void OnTerminate()
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
OnTimeZoneChanged(TimeZoneChangedEventArgs)
Override this method to handle changes in the current time zone. Calling base.OnTimeZoneChanged() ensures that the TimeZoneChanged event is triggered.
Declaration
C#Copyprotected virtual void OnTimeZoneChanged(TimeZoneChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TimeZoneChangedEventArgs | e | The arguments containing details about the time zone change |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
Declaration
C#Copypublic override void Run(string[] args)
Parameters
Type | Name | Description |
---|---|---|
string[] | args | Arguments from commandline. |
Overrides
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
Events
Declaration
C#Copypublic event EventHandler<AppControlReceivedEventArgs> AppControlReceived
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><AppControlReceivedEventArgs> |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
Declaration
C#Copypublic event EventHandler Created
Event Type
Type | Description |
---|---|
System.EventHandler |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
Declaration
C#Copypublic event EventHandler<DeviceOrientationEventArgs> DeviceOrientationChanged
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><DeviceOrientationEventArgs> |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
Declaration
C#Copypublic event EventHandler<LocaleChangedEventArgs> LocaleChanged
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><LocaleChangedEventArgs> |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
Declaration
C#Copypublic event EventHandler<LowBatteryEventArgs> LowBattery
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><LowBatteryEventArgs> |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
Declaration
C#Copypublic event EventHandler<LowMemoryEventArgs> LowMemory
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><LowMemoryEventArgs> |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
Declaration
C#Copypublic event EventHandler<RegionFormatChangedEventArgs> RegionFormatChanged
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><RegionFormatChangedEventArgs> |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
Declaration
C#Copypublic event EventHandler Terminated
Event Type
Type | Description |
---|---|
System.EventHandler |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.
Declaration
C#Copypublic event EventHandler<TimeZoneChangedEventArgs> TimeZoneChanged
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><TimeZoneChangedEventArgs> |
Remarks
By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states.