Share via


BluetoothGattServer 类

定义

蓝牙 GATT 配置文件服务器角色的公共 API。

[Android.Runtime.Register("android/bluetooth/BluetoothGattServer", DoNotGenerateAcw=true)]
public sealed class BluetoothGattServer : Java.Lang.Object, Android.Bluetooth.IBluetoothProfile, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/bluetooth/BluetoothGattServer", DoNotGenerateAcw=true)>]
type BluetoothGattServer = class
    inherit Object
    interface IBluetoothProfile
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
继承
BluetoothGattServer
属性
实现

注解

android.bluetooth.BluetoothGattServerJava 文档。

此页面的部分内容是基于 创建和共享的工作进行的修改,并根据 署名许可中所述的术语使用。

属性

Class

返回此 Object的运行时类。

(继承自 Object)
ConnectedDevices

不支持 - 请使用 BluetoothManager#getConnectedDevices(int) as BluetoothProfile#GATT 参数

Handle

基础 Android 实例的句柄。

(继承自 Object)
JniIdentityHashCode

蓝牙 GATT 配置文件服务器角色的公共 API。

(继承自 Object)
JniPeerMembers

蓝牙 GATT 配置文件服务器角色的公共 API。

PeerReference

蓝牙 GATT 配置文件服务器角色的公共 API。

(继承自 Object)
Services

返回此设备提供的 GATT 服务的列表。

ThresholdClass

此 API 支持 Mono for Android 基础结构,不应直接从代码使用。

(继承自 Object)
ThresholdType

此 API 支持 Mono for Android 基础结构,不应直接从代码使用。

(继承自 Object)

方法

AddService(BluetoothGattService)

将服务添加到要托管的服务列表。

CancelConnection(BluetoothDevice)

断开已建立的连接,或取消当前正在进行的连接尝试。

ClearServices()

从所提供的服务列表中删除所有服务。

Clone()

创建并返回此对象的副本。

(继承自 Object)
Close()

关闭此 GATT 服务器实例。

Connect(BluetoothDevice, Boolean)

启动与支持蓝牙 GATT 的设备的连接。

Dispose()

蓝牙 GATT 配置文件服务器角色的公共 API。

(继承自 Object)
Dispose(Boolean)

蓝牙 GATT 配置文件服务器角色的公共 API。

(继承自 Object)
Equals(Object)

指示其他某个对象是否“等于”此对象。

(继承自 Object)
GetConnectionState(BluetoothDevice)

不支持 - 请使用 BluetoothManager#getConnectedDevices(int) as BluetoothProfile#GATT 参数

GetDevicesMatchingConnectionStates(ProfileState[])

不支持 - 请使用BluetoothManager#getDevicesMatchingConnectionStates(int, int[]) 使用 BluetoothProfile#GATT 作为第一个参数

GetHashCode()

返回对象的哈希代码值。

(继承自 Object)
GetService(UUID)

BluetoothGattService从此设备提供的服务列表中返回 。

JavaFinalize()

当垃圾回收确定不再引用对象时,由对象上的垃圾回收器调用。

(继承自 Object)
Notify()

唤醒正在等待此对象的监视器的单个线程。

(继承自 Object)
NotifyAll()

唤醒正在等待此对象的监视器的所有线程。

(继承自 Object)
NotifyCharacteristicChanged(BluetoothDevice, BluetoothGattCharacteristic, Boolean)

发送本地特征已更新的通知或指示。

NotifyCharacteristicChanged(BluetoothDevice, BluetoothGattCharacteristic, Boolean, Byte[])

蓝牙 GATT 配置文件服务器角色的公共 API。

ReadPhy(BluetoothDevice)

读取连接的当前发送器 PHY 和接收器 PHY。

RemoveService(BluetoothGattService)

从要提供的服务列表中删除服务。

SendResponse(BluetoothDevice, Int32, GattStatus, Int32, Byte[])

蓝牙 GATT 配置文件服务器角色的公共 API。

SendResponse(BluetoothDevice, Int32, ProfileState, Int32, Byte[])

向远程设备发送对读取或写入请求的响应。

SetHandle(IntPtr, JniHandleOwnership)

设置 Handle 属性。

(继承自 Object)
SetPreferredPhy(BluetoothDevice, BluetoothPhy, BluetoothPhy, BluetoothPhyOption)

设置此应用的首选连接 PHY。

ToArray<T>()

蓝牙 GATT 配置文件服务器角色的公共 API。

(继承自 Object)
ToString()

返回对象的字符串表示形式。

(继承自 Object)
UnregisterFromRuntime()

蓝牙 GATT 配置文件服务器角色的公共 API。

(继承自 Object)
Wait()

导致当前线程等待,直到它被唤醒,通常是通过 em <通知/em> 或 <em>interrupted</em>。<>

(继承自 Object)
Wait(Int64)

导致当前线程等待,直到它被唤醒,通常是通过 em <通知/em> 或 <em>interrupted</em>,或直到经过一定数量的实时。<>

(继承自 Object)
Wait(Int64, Int32)

导致当前线程等待,直到它被唤醒,通常是通过 em <通知/em> 或 <em>interrupted</em>,或直到经过一定数量的实时。<>

(继承自 Object)

显式接口实现

IJavaPeerable.Disposed()

蓝牙 GATT 配置文件服务器角色的公共 API。

(继承自 Object)
IJavaPeerable.DisposeUnlessReferenced()

蓝牙 GATT 配置文件服务器角色的公共 API。

(继承自 Object)
IJavaPeerable.Finalized()

蓝牙 GATT 配置文件服务器角色的公共 API。

(继承自 Object)
IJavaPeerable.JniManagedPeerState

蓝牙 GATT 配置文件服务器角色的公共 API。

(继承自 Object)
IJavaPeerable.SetJniIdentityHashCode(Int32)

蓝牙 GATT 配置文件服务器角色的公共 API。

(继承自 Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)

蓝牙 GATT 配置文件服务器角色的公共 API。

(继承自 Object)
IJavaPeerable.SetPeerReference(JniObjectReference)

蓝牙 GATT 配置文件服务器角色的公共 API。

(继承自 Object)

扩展方法

JavaCast<TResult>(IJavaObject)

执行 Android 运行时检查的类型转换。

JavaCast<TResult>(IJavaObject)

蓝牙 GATT 配置文件服务器角色的公共 API。

GetJniTypeName(IJavaPeerable)

蓝牙 GATT 配置文件服务器角色的公共 API。

适用于