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#
Copy
public class CoreApplication : Application, IDisposable
Inheritance
object
CoreApplication
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 Source

CoreApplication(ICoreBackend)

Initializes the CoreApplication class by providing a specific implementation of the ICoreBackend interface.

Declaration
C#
Copy
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 Source

Backend

The backend instance.

Declaration
C#
Copy
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 Source

Dispose(bool)

Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.

Declaration
C#
Copy
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.

View Source

Exit()

Exits the main loop of the application.

Declaration
C#
Copy
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.

View Source

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#
Copy
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.

View Source

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#
Copy
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.

View Source

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#
Copy
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.

View Source

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#
Copy
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.

View Source

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#
Copy
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.

View Source

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#
Copy
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.

View Source

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#
Copy
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.

View Source

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#
Copy
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.

View Source

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#
Copy
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.

View Source

Run(string[])

Runs the application's main loop.

Declaration
C#
Copy
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 Source

AppControlReceived

Occurs whenever the application receives the appcontrol message.

Declaration
C#
Copy
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.

View Source

Created

Occurs when the application is launched.

Declaration
C#
Copy
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.

View Source

DeviceOrientationChanged

Occurs when the device orientation is changed.

Declaration
C#
Copy
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.

View Source

LocaleChanged

Occurs when the system language is chagned.

Declaration
C#
Copy
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.

View Source

LowBattery

Occurs when the system battery is low.

Declaration
C#
Copy
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.

View Source

LowMemory

Occurs when the system memory is low.

Declaration
C#
Copy
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.

View Source

RegionFormatChanged

Occurs when the region format is changed.

Declaration
C#
Copy
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.

View Source

Terminated

Occurs when the application is about to shutdown.

Declaration
C#
Copy
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.

View Source

TimeZoneChanged

Occurs when the time zone is changed.

Declaration
C#
Copy
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.

Implements

System.IDisposable