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

相关推荐
雨白34 分钟前
Android 两种拖拽 API 详解:ViewDragHelper 和 OnDragListener 的原理与区别
android
元亓亓亓38 分钟前
JavaWeb--day3--Ajax&Element&路由&打包部署
android·ajax·okhttp
居然是阿宋44 分钟前
Android XML属性与Jetpack Compose的对应关系(控件基础属性篇)
android
GoatJun1 小时前
Android ScrollView嵌套RecyclerView 导致RecyclerView数据展示不全问题
android
潜龙95271 小时前
第6.2节 Android Agent开发<二>
android·python·覆盖率数据
网安Ruler3 小时前
代码审计-PHP专题&原生开发&SQL注入&1day分析构造&正则搜索&语句执行监控&功能定位
android
paid槮4 小时前
MySql基础:数据类型
android·mysql·adb
用户2018792831675 小时前
AMS和app通信的小秘密
android
用户2018792831676 小时前
ThreadPoolExecutor之市场雇工的故事
android
诺诺Okami6 小时前
Android Framework-Launcher-InvariantDeviceProfile
android