FMRadio Class
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
This class acts as a singleton controller for the device radio.
Inheritance Hierarchy
System..::.Object
Microsoft.Devices.Radio..::.FMRadio
Namespace: Microsoft.Devices.Radio
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
Syntax
Public NotInheritable Class FMRadio
public sealed class FMRadio
The FMRadio type exposes the following members.
Properties
Name | Description | |
---|---|---|
CurrentRegion | Sets the frequency region information for the FMRadio class. | |
Frequency | Tunes the FMRadio to a new frequency. | |
Instance | Returns a singleton that represents the FMRadio class. | |
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. |
Top
Methods
Name | Description | |
---|---|---|
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
Warning
FM radio is supported only in apps that target Windows Phone OS 7.1. If you use the FMRadio class in apps that target Windows Phone OS 8.0 or later, a RadioDisabledException indicates that the FM radio feature is not available. On Windows Phone 8 devices with a build of 8.0.10322 or greater, the run-time exception may not occur if you use the FMRadio API. However, the FMRadio API is not supported for apps that target Windows Phone OS 8.0.
Capabilities
If you use this API in your app, you must specify the following capabilities in the app manifest. Otherwise, your app might not work correctly or it might exit unexpectedly.
ID_CAP_MEDIALIB |
Windows Phone OS 7.1 |
For more info, see App capabilities and hardware requirements for Windows Phone 8.
Version Information
Windows Phone OS
Supported in: 8.1, 8.0, 7.1, 7.0
Platforms
Windows Phone
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.