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。 物理层;

相关推荐
得单片机的运3 小时前
STM32的蓝牙通讯(HAL库)
stm32·单片机·嵌入式硬件·蓝牙
Jackilina_Stone9 小时前
【faiss】用于高效相似性搜索和聚类的C++库 | 源码详解与编译安装
android·linux·c++·编译·faiss
棒棒AIT10 小时前
mac 苹果电脑 Intel 芯片(Mac X86) 安卓虚拟机 Android模拟器 的救命稻草(下载安装指南)
android·游戏·macos·安卓·mac
fishwheel10 小时前
Android:Reverse 实战 part 2 番外 IDA python
android·python·安全
消失的旧时光-194313 小时前
Android网络框架封装 ---> Retrofit + OkHttp + 协程 + LiveData + 断点续传 + 多线程下载 + 进度框交互
android·网络·retrofit
zcychong13 小时前
Handler(二):Java层源码分析
android
Chef_Chen15 小时前
从0开始学习R语言--Day58--竞争风险模型
android·开发语言·kotlin
用户20187928316716 小时前
演员的智能衣橱系统之Selector选择器
android
CYRUS_STUDIO16 小时前
OLLVM 混淆 + VMP 壳照样破!绕过加壳 SDK 的核心检测逻辑
android·逆向·汇编语言