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.
public 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
View SourceCoreApplication(ICoreBackend)
Initializes the CoreApplication class by providing a specific implementation of the ICoreBackend interface.
Declaration
public 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
View SourceBackend
The backend instance.
Declaration
protected 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
View SourceDispose(bool)
Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
Declaration
protected 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.
Exit()
Exits the main loop of the application.
Declaration
public 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
protected 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
protected 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
protected 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
protected 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
protected 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
protected 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
protected 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
protected 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
protected 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.
Run(string[])
Runs the application's main loop.
Declaration
public 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
View SourceAppControlReceived
Occurs whenever the application receives the appcontrol message.
Declaration
public 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.
Created
Occurs when the application is launched.
Declaration
public 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.
DeviceOrientationChanged
Occurs when the device orientation is changed.
Declaration
public 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.
LocaleChanged
Occurs when the system language is chagned.
Declaration
public 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.
LowBattery
Occurs when the system battery is low.
Declaration
public 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.
LowMemory
Occurs when the system memory is low.
Declaration
public 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.
RegionFormatChanged
Occurs when the region format is changed.
Declaration
public 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.
Terminated
Occurs when the application is about to shutdown.
Declaration
public 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.
TimeZoneChanged
Occurs when the time zone is changed.
Declaration
public 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.