-api-id | -api-type | -api-device-family-note |
---|---|---|
M:Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService.FromIdAsync(System.String) |
winrt method |
xbox |
Instantiates a new GattDeviceService from the device ID.
The GATT device ID.
The object for managing the asynchronous operation, which, upon completion, returns the newly instantiated GattDeviceService.
The first time this method is invoked by a store app, it should be called from a UI thread in order to display the consent prompt. After the user has granted consent, the method can be invoked from any application thread.
If a store app has not declared the right capabilities or the user does not grant consent, the method returns a null object.
- For Universal Windows Platform (UWP) apps, use the bluetooth capability. For more info see App capability declarations.
- For Windows 8.x store apps, see How to specify device capabilities for Bluetooth (Windows) to declare the right capabilities.
bluetooth