Class WatchApplication
Definition
- Namespace:
- Tizen.Applications
- Assembly:
- Tizen.Applications.WatchApplication.dll
The class that represents the Tizen watch application.
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] public class WatchApplication : CoreApplication, IDisposable
- Inheritance
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] public WatchApplication()
Remarks
Default backend for the watch application will be used.
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] public WatchApplication(ICoreBackend backend)
Parameters
Type | Name | Description |
---|---|---|
ICoreBackend | backend | The backend instance implementing the ICoreBackend interface. |
Remarks
If you want to change the backend, use this constructor.
Fields
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] protected Window Window
Field Value
Type | Description |
---|---|
Window |
Methods
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] protected AmbientTickType GetAmbientTickType()
Returns
Type | Description |
---|---|
AmbientTickType | AmbientTickType |
Examples
Copyclass MyApp : WatchApplication { ... public void TestMethod() { AmbientTickType atType; try { atType = GetAmbientTickType(); } catch { } } }
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when failed to get the ambient tick type. |
System.NotSupportedException | Thrown when the method is not supported. |
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] protected WatchTime GetCurrentTime()
Returns
Type | Description |
---|---|
WatchTime | WatchTime |
Examples
Copyclass MyApp : WatchApplication { ... public void TestMethod() { WatchTime wt; try { wt = GetCurrentTime(); } catch { } } }
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when failed to get the current time because of an invalid parameter. |
System.OutOfMemoryException | Thrown when failed to get the current time because the memory is not enough. |
System.NotSupportedException | Thrown when the method is not supported. |
GetTimeTickFrequency(out int, out TimeTickResolution)
Gets the frequency of the time tick.
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] protected void GetTimeTickFrequency(out int ticks, out TimeTickResolution type)
Parameters
Type | Name | Description |
---|---|---|
int | ticks | Ticks the number of ticks per given resolution type. |
TimeTickResolution | type | Type of the resolution type. |
Examples
Copyclass MyApp : WatchApplication { ... public void TestMethod() { int tick; TimeTickResolution tType; try { GetTimeTickFrequency(out tick, out tType); } catch { } } }
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when failed to get the time tick frequency. |
System.NotSupportedException | Thrown when the method is not supported. |
OnAmbientChanged(AmbientEventArgs)
Overrides this method to handle the behavior when the ambient mode is changed. If base.OnAmbientChanged() is not called, the event 'AmbientChanged' will not be emitted.
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] protected virtual void OnAmbientChanged(AmbientEventArgs mode)
Parameters
Type | Name | Description |
---|---|---|
AmbientEventArgs | mode | The received AmbientEventArgs. |
OnAmbientTick(TimeEventArgs)
Overrides this method to handle the behavior when the time tick event comes in ambient mode. If base.OnAmbientTick() is not called, the event 'AmbientTick' will not be emitted.
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] protected virtual void OnAmbientTick(TimeEventArgs time)
Parameters
Type | Name | Description |
---|---|---|
TimeEventArgs | time | The received TimeEventArgs to get time information. |
OnCreate()
Overrides this method to handle the behavior when the application is launched. If base.OnCreate() is not called, the event 'Created' will not be emitted.
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] protected override void OnCreate()
Overrides
OnPause()
Overrides this method to handle the behavior when the application is paused. If base.OnPause() is not called, the event 'Paused' will not be emitted.
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] protected virtual void OnPause()
OnResume()
Overrides this method to handle the behavior when the application is resumed. If base.OnResume() is not called, the event 'Resumed' will not be emitted.
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] protected virtual void OnResume()
OnTick(TimeEventArgs)
Overrides this method to handle the behavior when the time tick event comes. If base.OnTick() is not called, the event 'TimeTick' will not be emitted.
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] protected virtual void OnTick(TimeEventArgs time)
Parameters
Type | Name | Description |
---|---|---|
TimeEventArgs | time | The received TimeEventArgs to get the time information. |
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] public override void Run(string[] args)
Parameters
Type | Name | Description |
---|---|---|
string[] | args | Arguments from the commandline. |
Overrides
SetAmbientTickType(AmbientTickType)
Sets the type of the periodic ambient tick. OnAmbientTick will be called for the following settings. If the SetAmbientTickType is not called, the OnAmbientTick will be called every minute.
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] protected void SetAmbientTickType(AmbientTickType ambientTickType)
Parameters
Type | Name | Description |
---|---|---|
AmbientTickType | ambientTickType | The type of the ambient tick. |
Examples
Copyclass MyApp : WatchApplication { ... public void TestMethod() { try { SetAmbientTickType(AmbientTickType.EveryMinute); } catch { } } }
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when failed to set the ambient tick type. |
System.NotSupportedException | Thrown when the method is not supported. |
SetTimeTickFrequency(int, TimeTickResolution)
Sets the frequency of the time tick. OnTick will be called for the following settings. If SetTimeTickFrequency is not called, OnTick will be called every second.
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] protected void SetTimeTickFrequency(int ticks, TimeTickResolution type)
Parameters
Type | Name | Description |
---|---|---|
int | ticks | Ticks the number of ticks per given resolution type. |
TimeTickResolution | type | Type of the resolution type. |
Examples
Copyclass MyApp : WatchApplication { ... public void TestMethod() { try { SetTimeTickFrequency(1, TimeTickResolution.TimeTicksPerMinute); } catch { } } }
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when failed to set the time tick frequency. |
System.NotSupportedException | Thrown when the method is not supported. |
Events
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] public event EventHandler<AmbientEventArgs> AmbientChanged
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><AmbientEventArgs> |
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] public event EventHandler<TimeEventArgs> AmbientTick
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><TimeEventArgs> |
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] public event EventHandler Paused
Event Type
Type | Description |
---|---|
System.EventHandler |
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] public event EventHandler Resumed
Event Type
Type | Description |
---|---|
System.EventHandler |
Declaration
C#Copy[Obsolete("Deprecated since API10. Will be removed in API12.")] public event EventHandler<TimeEventArgs> TimeTick
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><TimeEventArgs> |