Advertisement

Kotlin用于Android开发:低功耗蓝牙与BLE技术研究

阅读量:

写在前面

Android平台低功耗蓝牙BLE开发实践
BLE功能角色划分包括:主机端执行扫描操作的设备、从机端进行广播传输的装置、

主机模式分析

申请手机蓝牙的操作权限

此处仅用于申请相关操作权限,某些手机应用程序在安装完成后可能会自动关闭位置服务功能,若无法正常进行设备扫描,需进入手机的应用权限设置界面,检查该应用程序的位置权限是否已启用

AndroidManifest.xml

复制代码
    <uses-feature android:name="android.hardware.bluetooth_le" 
    android:required="true"/><uses-permission android:name="android.permission.BLUETOOTH"/><uses-permission 
    android:name="android.permission.BLUETOOTH_ADMIN"/><!-- Needed only if your app targets Android 5.0 (API level 21) or 
    higher. --><uses-feature android:name="android.hardware.location.gp

全部评论 (0)

还没有任何评论哟~