![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
蓝牙
文章平均质量分 50
那一刻-逐风
这个作者很懒,什么都没留下…
展开
-
Android经典蓝牙连接
记录下连接经典蓝牙遇到的坑。一些基本概念资料很多,这里直接上代码,里面都有注释和一些关键点。整个类如下:import android.app.Activity;import android.bluetooth.BluetoothA2dp;import android.bluetooth.BluetoothAdapter;import android.bluetooth.BluetoothDevice;import android.bluetooth.BluetoothProfile原创 2022-02-15 11:32:04 · 3389 阅读 · 0 评论 -
Android蓝牙BLE开发,向设备发送简单数据
用的是git上的蓝牙管理库,首先添加依赖:implementation'com.clj.fastble:FastBleLib:2.3.4' //蓝牙管理库implementation 'com.yanzhenjie:permission:2.0.3' //6.0+权限管理一般给蓝牙发数据是嵌入式开发的哥们写好固定的某个UID,这个UID其实是一对的,分别是uuid_service,其对应的特征值characteristic uuid然后我们向这对UID发送数据,上代码:priv原创 2020-09-08 09:30:31 · 2061 阅读 · 1 评论