RfcommDeviceService.FromIdAsync(String) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
RFCOMM 서비스 instance DeviceInformation ID에서 RfcommDeviceService 개체를 가져옵니다.
public:
static IAsyncOperation<RfcommDeviceService ^> ^ FromIdAsync(Platform::String ^ deviceId);
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<RfcommDeviceService> FromIdAsync(winrt::hstring const& deviceId);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<RfcommDeviceService> FromIdAsync(string deviceId);
function fromIdAsync(deviceId)
Public Shared Function FromIdAsync (deviceId As String) As IAsyncOperation(Of RfcommDeviceService)
매개 변수
- deviceId
-
String
Platform::String
winrt::hstring
RFCOMM 서비스 instance 식별하는 DeviceInformation ID입니다. 이 ID는 Windows.Devices.Enumeration에서 검색할 수 있습니다.
반환
RFCOMM 서비스 instance 나타내는 RfcommDeviceService 개체입니다.
- 특성
Windows 요구 사항
앱 기능 |
bluetooth
|
설명
스토어 앱에서 이 메서드를 처음 호출할 때 동의 프롬프트를 표시하려면 UI 스레드에서 호출해야 합니다. 사용자가 동의를 부여한 후에는 모든 애플리케이션 스레드에서 메서드를 호출할 수 있습니다.
스토어 앱이 올바른 기능을 선언하지 않았거나 사용자가 동의를 부여하지 않는 경우 메서드는 null 개체를 반환합니다.
- UWP(유니버설 Windows 플랫폼) 앱의 경우 bluetooth 기능을 사용합니다. 자세한 내용은 앱 접근 권한 값 선언을 참조하세요.
- Windows 8.x 스토어 앱의 경우 Bluetooth(Windows)에 대한 디바이스 기능을 지정하여 올바른 기능을 선언하는 방법을 참조하세요.
경고
RFCOMM 서버 역할을 하는 디바이스가 매니페스트에 등록된 올바른 채널이 없는 경우 이 메서드는 RFCOMM 클라이언트 역할을 하는 디바이스에서 호출될 때 예외를 throw합니다.