android 蓝牙技术 学习记录 二

android 蓝牙连接 关键类

BluetoothDevice--------------------蓝牙设备

BluetoothGattCallback--------------连接回调

BluetoothGatt----------------------gatt

  1. public BluetoothGatt connectGatt(Context context, boolean autoConnect,

BluetoothGattCallback callback) ;

2.public BluetoothGatt connectGatt(Context context, boolean autoConnect,

BluetoothGattCallback callback, int transport) ;

3.public BluetoothGatt connect Gatt(Context context, boolean autoConnect,

BluetoothGattCallback callback, int transport, int phy) ;

4.public BluetoothGatt connectGatt(Context context, boolean autoConnect,

BluetoothGattCallback callback, int transport, int phy,

Handler handler) ;

5.public BluetoothGatt connectGatt(Context context, boolean autoConnect,

BluetoothGattCallback callback, int transport, boolean opportunistic, int phy, Handler handler) ; *

----autoConnect 是否自动连接参数。

----transport 是否低功耗。

-----phy。 物理层;

相关推荐
芦半山1 小时前
穿越二十年:Android Native 内存泄漏检测的进化之路
android
恋猫de小郭2 小时前
Flutter 在 iOS 26 模拟器跑不起来?其实很简单
android·前端·flutter
尤老师FPGA2 小时前
使用ZYNQ芯片和LVGL框架实现用户高刷新UI设计系列教程(第三十二讲)
android·java·ui
叫我龙翔2 小时前
【MySQL】从零开始了解数据库开发 --- 复合查询
android·mysql·数据库开发
Kapaseker3 小时前
Compose 中实现凸角、凹角、切角、尖角
android·kotlin
Erwinl3 小时前
android 开机启动 无线调试
android
此生只爱蛋3 小时前
mysql_store_result
android·adb
双桥wow4 小时前
Android Framework开机动画开发
android
fanged11 小时前
天马G前端的使用
android·游戏
molong93115 小时前
Kotlin 内联函数、高阶函数、扩展函数
android·开发语言·kotlin