Class Radio

Definition

Namespace:
Tizen.Multimedia
Assembly:
Tizen.Multimedia.Radio.dll
API Level:
3

Provides a means for using the radio feature.

C#
Copy
public class Radio : IDisposable
Inheritance
System.Object
Radio
Implements
System.IDisposable

Constructors

View Source

Radio()

Initializes a new instance of the Radio class.

Declaration
C#
Copy
public Radio()
Exceptions
Type Condition
System.NotSupportedException

The radio feature is not supported.

API Level: 3

Properties

View Source

ChannelSpacing

Gets the channel spacing for the current region.

Declaration
C#
Copy
public int ChannelSpacing { get; }
Property Value
Type Description
Int32
Exceptions
Type Condition
ObjectDisposedException

The radio already has been disposed.

API Level: 3
View Source

Frequency

Gets or sets the radio frequency in the range of 87500 ~ 108000 kHz.

Declaration
C#
Copy
public int Frequency { get; set; }
Property Value
Type Description
Int32
Exceptions
Type Condition
System.ArgumentOutOfRangeException

value is less than Min of FrequencyRange.
-or-
value is greater than Max of FrequencyRange.

ObjectDisposedException

The radio already has been disposed.

API Level: 3
View Source

FrequencyRange

Gets the frequency for the region in the range of 87500 ~ 108000 kHz.

Declaration
C#
Copy
public Range FrequencyRange { get; }
Property Value
Type Description
Range
Exceptions
Type Condition
ObjectDisposedException

The radio already has been disposed.

API Level: 3
View Source

IsMuted

Gets or sets the value indicating if the radio is muted.

Declaration
C#
Copy
public bool IsMuted { get; set; }
Property Value
Type Description
Boolean

true if the radio is muted; otherwise, false. The default is false.

Exceptions
Type Condition
ObjectDisposedException

The radio already has been disposed.

API Level: 3
View Source

SignalStrength

Gets the current signal strength in the range of -128 ~ 128 dBm.

Declaration
C#
Copy
public int SignalStrength { get; }
Property Value
Type Description
Int32
Exceptions
Type Condition
ObjectDisposedException

The radio already has been disposed.

API Level: 3
View Source

State

Gets the current state of the radio.

Declaration
C#
Copy
public RadioState State { get; }
Property Value
Type Description
RadioState
Exceptions
Type Condition
ObjectDisposedException

The radio already has been disposed.

API Level: 3
View Source

Volume

Gets or sets the radio volume level.

Declaration
C#
Copy
public float Volume { get; set; }
Property Value
Type Description
System.Single

The default is 1.0.

Remarks

Valid volume range is from 0 to 1.0(100%), inclusive.

Exceptions
Type Condition
System.ArgumentOutOfRangeException

value is less than zero.
-or-
value is greater than 1.0.

ObjectDisposedException

The radio already has been disposed.

API Level: 3

Methods

View Source

Dispose()

Releases all resources used by the Radio object.

Declaration
C#
Copy
public void Dispose()
API Level: 3
View Source

Dispose(Boolean)

Releases the resources used by the Radio.

Declaration
C#
Copy
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
Boolean disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

API Level: 3
View Source

SeekDownAsync()

Seeks down the effective frequency of the radio.

Declaration
C#
Copy
public Task<int> SeekDownAsync()
Returns
Type Description
System.Threading.Tasks.Task<Int32>

A task that represents the asynchronous seeking operation. The result value is the current frequency in the range of 87500 ~ 108000 kHz. It can be -1 if the seeking operation has failed.

Remarks

The radio must be in the Playing state.

Exceptions
Type Condition
System.InvalidOperationException

The radio is not in the valid state.
-or-
Seeking is in progress.

ObjectDisposedException

The radio already has been disposed.

API Level: 3
View Source

SeekUpAsync()

Seeks up the effective frequency of the radio.

Declaration
C#
Copy
public Task<int> SeekUpAsync()
Returns
Type Description
System.Threading.Tasks.Task<Int32>

A task that represents the asynchronous seeking operation. The result value is the current frequency in the range of 87500 ~ 108000 kHz. It can be -1 if the seeking operation has failed.

Remarks

The radio must be in the Playing state.

Exceptions
Type Condition
System.InvalidOperationException

The radio is not in the valid state.
-or-
Seeking is in progress.

ObjectDisposedException

The radio already has been disposed.

API Level: 3
View Source

Start()

Starts the radio.

Declaration
C#
Copy
public void Start()
Remarks

The radio must be in the Ready state.

Exceptions
Type Condition
System.InvalidOperationException

The radio is not in the valid state.

ObjectDisposedException

The radio already has been disposed.

API Level: 3
View Source

StartScan()

Starts the radio scanning and triggers the ScanUpdated event when the scan information is updated.

Declaration
C#
Copy
public void StartScan()
Remarks

The radio must be in the Ready or Playing state.

Exceptions
Type Condition
System.InvalidOperationException

The radio is not in the valid state.

ObjectDisposedException

The radio already has been disposed.

API Level: 3
View Source

Stop()

Stops the radio.

Declaration
C#
Copy
public void Stop()
Remarks

The radio must be in the Playing state.

Exceptions
Type Condition
System.InvalidOperationException

The radio is not in the valid state.

ObjectDisposedException

The radio already has been disposed.

API Level: 3
View Source

StopScan()

Stops the radio scanning.

Declaration
C#
Copy
public void StopScan()
Remarks

The radio must be in the Scanning state.

Exceptions
Type Condition
System.InvalidOperationException

The radio is not in the valid state.

ObjectDisposedException

The radio already has been disposed.

See Also
API Level: 3

Events

View Source

Interrupted

Occurs when the radio is interrupted.

Declaration
C#
Copy
public event EventHandler<RadioInterruptedEventArgs> Interrupted
Event Type
Type Description
System.EventHandler<RadioInterruptedEventArgs>
API Level: 3
View Source

ScanCompleted

Occurs when the radio scanning is completed.

Declaration
C#
Copy
public event EventHandler ScanCompleted
Event Type
Type Description
System.EventHandler
API Level: 3
View Source

ScanStopped

Occurs when the radio scanning stops.

Declaration
C#
Copy
public event EventHandler ScanStopped
Event Type
Type Description
System.EventHandler
API Level: 3
View Source

ScanUpdated

Occurs when the radio scanning information is updated.

Declaration
C#
Copy
public event EventHandler<ScanUpdatedEventArgs> ScanUpdated
Event Type
Type Description
System.EventHandler<ScanUpdatedEventArgs>
API Level: 3

Implements

System.IDisposable