Radio.FromIdAsync(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A static method that retrieves a Radio object. The method accepts the 'Device.Id' found through Windows.Devices.Enumeration.DeviceInformation.FindAllAsync. This procedure is more reliable than using GetRadiosAsync to obtain a radio in situations where a USB Radio has failed or been removed on a Windows 10 workstation. In this instance of a failed or removed radio, GetRadiosAsync returns no bluetooth radio. FindAllAsync, in contrast, returns a valid Id that can be passed to FromIdAsync to obtain the radio object, which will report itself as now being in the state of 'Disabled'.
public:
static IAsyncOperation<Radio ^> ^ FromIdAsync(Platform::String ^ deviceId);
/// [Windows.Foundation.Metadata.Overload("FromIdAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<Radio> FromIdAsync(winrt::hstring const& deviceId);
[Windows.Foundation.Metadata.Overload("FromIdAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<Radio> FromIdAsync(string deviceId);
function fromIdAsync(deviceId)
Public Shared Function FromIdAsync (deviceId As String) As IAsyncOperation(Of Radio)
Parameters
- deviceId
-
String
Platform::String
winrt::hstring
A string that identifies a particular radio device.
Returns
An asynchronous retrieval operation. On successful completion, it contains a Radio object that represents the specified radio device. Otherwise it throws an exception.
- Attributes