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

Applies to Windows and Windows Phone

Instantiates a new GattDeviceService from the device ID.

Syntax


Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService.fromIdAsync(deviceId).done( /* Your success and error handlers */ );

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

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:
© 2014 Microsoft. All rights reserved.