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.
public abstract class BaseComponent
- Inheritance
-
objectBaseComponent
- 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 SourceComponentId
Gets the ID of the component.
Declaration
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.
Id
Gets the unique instance ID of the component. It will be created after OnCreate method is invoked.
Declaration
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.
Parent
Gets the parent application object to which the component belongs.
Declaration
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 SourceFinish()
Finishes the current component.
Declaration
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.
OnRestoreContents(Bundle)
Override this method to handle restoring the previous state of the component.
Declaration
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.
OnSaveContent(Bundle)
Override this method to handle saving the current state of the component.
Declaration
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.
SendLaunchRequestAsync(AppControl, AppControlReplyCallback)
Sends a launch request asynchronously.
Declaration
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 SourceDeviceOrientationChanged
Occurs when the device orientation is changed.
Declaration
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.
LocaleChanged
Occurs when the system language is chagned.
Declaration
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.
LowBattery
Occurs when the system battery is low.
Declaration
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.
LowMemory
Occurs when the system memory is low.
Declaration
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.
RegionFormatChanged
Occurs when the region format is changed.
Declaration
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.
SuspendedStateChanged
Occurs when the device orientation is changed.
Declaration
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.
TimeZoneChanged
Occurs when the time zone is changed.
Declaration
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.