Windows hardware
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

GattDeviceService.FromIdAsync | fromIdAsync method

Instantiates a new GattDeviceService from the device ID.

Syntax


Public Shared Function FromIdAsync(
  deviceId As String 
) As IAsyncOperation(Of GattDeviceService)

Parameters

deviceId

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The GATT device ID.

Return value

Type: IAsyncOperation<GattDeviceService>

The object for managing the asynchronous operation, which, upon completion, returns the newly instantiated GattDeviceService.

Remarks

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.

See How to specify device capabilities for Bluetooth (Windows) to declare the right capabilities.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Devices.Bluetooth.GenericAttributeProfile
Windows::Devices::Bluetooth::GenericAttributeProfile [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Devices.Bluetooth.GenericAttributeProfile
Windows::Devices::Bluetooth::GenericAttributeProfile [C++]

Metadata

Windows.winmd

See also

GattDeviceService

 

 

Show:
© 2016 Microsoft