Class BaseComponent

Definition

Namespace:
Tizen.Applications.ComponentBased.Common
Assembly:
Tizen.Applications.ComponentBased.dll

Represents the base class for components, providing common functionalities for both FrameComponent and ServiceComponent.

C#
Copy
public abstract class BaseComponent
Inheritance
object
BaseComponent
Derived
Remarks

This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.

Properties

View Source

ComponentId

Gets the ID of the component.

Declaration
C#
Copy
public string ComponentId { get; }
Property Value
Type Description
string
Remarks

This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.

View Source

Id

Gets the unique instance ID of the component. It will be created after OnCreate method is invoked.

Declaration
C#
Copy
public string Id { get; }
Property Value
Type Description
string
Remarks

This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.

View Source

Parent

Gets the parent application object to which the component belongs.

Declaration
C#
Copy
public ComponentBasedApplication Parent { get; }
Property Value
Type Description
ComponentBasedApplication
Remarks

This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.

Methods

View Source

Finish()

Finishes the current component.

Declaration
C#
Copy
public void Finish()
Remarks

This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.

View Source

OnRestoreContents(Bundle)

Override this method to handle restoring the previous state of the component.

Declaration
C#
Copy
public virtual void OnRestoreContents(Bundle c)
Parameters
Type Name Description
Bundle c

A bundle containing the saved state of the component. It can only be used within the callback. To use it outside, create a copy.

Remarks

This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.

View Source

OnSaveContent(Bundle)

Override this method to handle saving the current state of the component.

Declaration
C#
Copy
public virtual void OnSaveContent(Bundle c)
Parameters
Type Name Description
Bundle c

A bundle containing the current state of the component. It can only be used within the callback. To use it outside, create a copy.

Remarks

This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.

View Source

SendLaunchRequestAsync(AppControl, AppControlReplyCallback)

Sends a launch request asynchronously.

Declaration
C#
Copy
public Task<AppControlResult> SendLaunchRequestAsync(AppControl control, AppControlReplyCallback replyAfterLaunching)
Parameters
Type Name Description
AppControl control

The AppControl object representing the request details.

AppControlReplyCallback replyAfterLaunching

The callback function to be invoked when the reply is received.

Returns
Type Description
System.Threading.Tasks.Task<TResult><AppControlResult>

A task representing the result of the launch request.

Remarks

Use this method to send a launch request with group mode enabled. If group mode is not required, you can use SendLaunchRequestAsync() instead.

Exceptions
Type Condition
System.ArgumentException

Thrown when failed because of the argument is invalid.

System.InvalidOperationException

Thrown when there is a failure in setting the component information in the AppControl.

AppNotFoundException

Thrown when the target application is not found.

LaunchRejectedException

Thrown when the launch request is rejected.

Events

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

This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.

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

This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.

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

This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.

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

This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.

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

This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.

View Source

SuspendedStateChanged

Occurs when the device orientation is changed.

Declaration
C#
Copy
public event EventHandler<SuspendedStateEventArgs> SuspendedStateChanged
Event Type
Type Description
System.EventHandler<TEventArgs><SuspendedStateEventArgs>
Remarks

This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.

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

This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.