Udostępnij za pośrednictwem


BluetoothGattServer.AddService(BluetoothGattService) Method

Definition

Add a service to the list of services to be hosted.

[Android.Runtime.Register("addService", "(Landroid/bluetooth/BluetoothGattService;)Z", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool AddService (Android.Bluetooth.BluetoothGattService? service);
[<Android.Runtime.Register("addService", "(Landroid/bluetooth/BluetoothGattService;)Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.AddService : Android.Bluetooth.BluetoothGattService -> bool

Parameters

service
BluetoothGattService

Service to be added to the list of services provided by this device.

Returns

true, if the request to add service has been initiated

Attributes

Remarks

Java documentation for android.bluetooth.BluetoothGattServer.addService(android.bluetooth.BluetoothGattService).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to