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

相关推荐
QING6182 小时前
Kotlin windowedSequence用法及代码示例
android·kotlin·源码阅读
QING6182 小时前
Kotlin MatchResult.Destructured用法及代码示例
android·kotlin·源码阅读
恋猫de小郭3 小时前
注意,暂时不要升级 MacOS ,Flutter/RN 等构建 ipa 可能会因 「ITMS-90048」This bundle is invalid 被拒绝
android·前端·flutter
每次的天空10 小时前
Android学习总结之算法篇五(字符串)
android·学习·算法
Gracker11 小时前
Android Weekly #202513
android
张拭心13 小时前
工作九年程序员的三月小结
android·前端
每次的天空13 小时前
Flutter学习总结之Android渲染对比
android·学习·flutter
鸿蒙布道师15 小时前
鸿蒙NEXT开发土司工具类(ArkTs)
android·ios·华为·harmonyos·arkts·鸿蒙系统·huawei
智想天开15 小时前
11.使用依赖注入容器实现松耦合
android
yunteng52117 小时前
音视频(四)android编译
android·ffmpeg·音视频·x264·x265