首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

Android使用BLE(低功耗蓝牙,Bluetooth Low Energy)

你可以在bluetooth.org 找到一个目前支持的基于GATT的配置文件和服务列表。 角色和责任 以下是Android设备与BLE设备交互时的角色和责任: *中央 VS 外围设备。...一般情况下Android4.3以后的手机具有蓝牙模块的话都会支持BLE,具体可以再代码中判断。 为了在app中使用蓝牙功能,必须声明蓝牙权限BLUETOOTH。...如果想让你的app启动设备发现或操纵蓝牙设置,必须声明BLUETOOTH_ADMIN权限。注意:如果你使用BLUETOOTH_ADMIN权限,你也必须声明BLUETOOTH权限。...android:name="android.permission.BLUETOOTH"/> android:name="android.permission.BLUETOOTH_ADMIN..."/> 如果想声明你的app只为具有BLE的设备提供,在manifest文件中包括: android:name="android.hardware.bluetooth_le"

3.5K00
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    Android4.42-Setting源码分析之蓝牙模块Bluetooth(下)

    接着上一篇   Android4.42-Settings源码分析之蓝牙模块Bluetooth(上) 继续蓝牙模块源码的研究 THREE,蓝牙模块功能实现 switch的分析以及本机蓝牙重命名和可见性的分析见上一篇...BluetoothDevice.ACTION_CLASS_CHANGED:远程设备的蓝牙类已经改变 BluetoothDevice.ACTION_UUID: 更多关于蓝牙广播的内容可以参考在线文档 http://www.android-doc.com.../reference/android/bluetooth/BluetoothDevice.html 程序中已经为这些广播注册了监听器,当接收到广播后作出相应动作,对列表就行修改 首先是对缓存列表进行更改...设备的扫描:BluetoothAdapter----stopLeScan(mLeScanCallBack). ii>,各种广播相关参考网址,这是一个API在线文档,解释的很清楚 http://www.android-doc.com.../reference/android/bluetooth/BluetoothDevice.html 2>,蓝牙模块源码中涉及到的类 i>,BluetoothSettings.java:蓝牙界面的显示布局

    96130

    Android中Broadcast的Intent大全 博客分类: Android小技巧 Android.netWAPGoogle

    Api Level 3:(SDK 1.5) android.bluetooth.a2dp.intent.action.SINK_STATE_CHANGED android.bluetooth.intent.action.BLUETOOTH_STATE_CHANGED...android.bluetooth.intent.action.HEADSET_STATE_CHANGED android.bluetooth.intent.action.NAME_CHANGED android.bluetooth.intent.action.PAIRING_CANCEL...android.bluetooth.adapter.action.SCAN_MODE_CHANGED android.bluetooth.adapter.action.STATE_CHANGED android.bluetooth.device.action.ACL_CONNECTED...android.bluetooth.device.action.BOND_STATE_CHANGED android.bluetooth.device.action.CLASS_CHANGED android.bluetooth.device.action.FOUND...android.bluetooth.device.action.NAME_CHANGED android.bluetooth.devicepicker.action.DEVICE_SELECTED android.bluetooth.devicepicker.action.LAUNCH

    92620

    【Android 应用开发】BluetoothDevice详解

    需要权限 android.permission.BLUETOOTH : 允许程序连接到已配对的蓝牙设备, 请求连接/接收连接/传输数据需要改权限, 主要用于对配对后进行操作; android.permission.BLUETOOTH_ADMIN..., 包含EXTRA_DEVICE附加域, 该附加域中存放的是BluetoothDevice对象, 需要BLUETOOTH权限; String ACTION_ACL_DISCONNECTED : android.bluetooth.device.action.ACL_DISCONNECTED...ACTION_BOND_STATE_CHANGED : android.bluetooth.device.action.BOND_STATE_CHANGED, 远程蓝牙设备状态改变的时候发出这个广播,...权限; String ACTION_CLASS_CHANGED : android.bluetooth.device.action.CLASS_CHANGED, 一个远程设备的绑定状态发生改变时发出广播..., 该广播附加域有 EXTRA_DEVICE, EXTRA_BOND_STATE; 需要BLUETOOTH权限; String ACTION_FOUND : android.bluetooth.device.action.FOUND

    1.9K30

    扫码

    添加站长 进交流群

    领取专属 10元无门槛券

    手把手带您无忧上云

    扫码加入开发者社群

    相关资讯

    热门标签

    活动推荐

      运营活动

      活动名称
      广告关闭
      领券