How to: Set up and Tune the FM Radio for Windows Phone
March 22, 2012
This topic describes how to work with the FMRadio API. You can access the following FMRadio class properties and enumerations to perform functions such as creating an instance of the radio, turning the radio on and off, and tuning the radio.
The following table shows FMRadio properties.
Property | Description |
|---|---|
CurrentRegion | Sets the frequency region information for the radio. |
Frequency | Tunes the FM radio to a specified frequency. |
Instance | Returns an instance of the FM radio. |
PowerMode | Sets the RadioPowerMode of the device. Setting this property turns the device radio on or off. |
SignalStrength | Retrieves the received signal strength indicator (RSSI) value for the currently-tuned frequency. |
FMRadio Enumerations:
Enum | Description |
|---|---|
RadioPowerMode | An enumeration that contains the possible power modes of the radio. The current RadioPowerMode values are On and Off. |
RadioRegion | An enumeration that contains the set of radio frequency regions available for radio tuning. The current values are Europe, Japan, and UnitedStates. |
-
It can take up to three seconds for the first FMRadio method call to return after the phone boots up.
-
After the FM Radio is first initialized, if the phone is running in an active state, the methods will typically return within 100 ms.
-
Avoid setting up the FM Radio or synchronizing the Silverlight UI thread while the application is running.
-
Delay sending further commands to the FM Radio until at least one second after the FM Radio is enabled.
Note:
|
|---|
|
|
For more information and performance tips, see Creating High Performance Silverlight Applications for Windows Phone.
To tune the FM radio:
Set the radio region and the frequency. You need to set the radio region only once for the duration of the application’s execution.
|
|---|
|
The FM Tuner may take up to one second to complete the tuning operation. Delay sending further commands to the FM Radio until at least one second after the FM Radio is enabled. |
Note:
The 7x27a processor does not allow accessing the FM radio and microphone simultaneously.