jjzjj

startDiscovery

全部标签

经典和 BTLE 设备的 Android 蓝牙扫描

机器人documentation状态:Note:YoucanonlyscanforBluetoothLEdevicesorscanforClassicBluetoothdevices,asdescribedinBluetooth.YoucannotscanforbothBluetoothLEandclassicdevicesatthesametime.但是我注意到调用mBtAdapter.startDiscovery();正在返回经典和btle设备。有人知道什么是正确的吗? 最佳答案 根据我的理解,文档的意思是您不能拥有startL

android - Android 上的蓝牙 : startDiscovery doesn't work and I have bluetooth enabled

我在使用startDiscovery()时遇到问题。这是问题所在,我已经像这样向我的BroadcastReceiver注册了以下Intents:IntentFilterfilterFound=newIntentFilter(BluetoothDevice.ACTION_FOUND);IntentFilterfilterStart=newIntentFilter(BluetoothAdapter.ACTION_DISCOVERY_STARTED);IntentFilterfilterStop=newIntentFilter(BluetoothAdapter.ACTION_DISCOVER

即使具有位置权限,也不会触发 Android BLE startDiscovery() 回调

该应用程序面向22位用户,最低版本为18,并且可以在Lollipop上正常运行。启动Marshmallow应用程序需要BLE的“精细”和“粗略”权限。我已经添加了它们,但没有触发回调。安卓list:...发现是通过UUID过滤完成的:this.adapter.startLeScan(newUUID[]{this.serviceUUID},this.discoveryListener);回调:@OverridepublicvoidonLeScan(BluetoothDevicedevice,intrssi,byte[]scanRecord){Log.d(TAG,"Bluetoothdev

android - 由于棉花糖使用 BluetoothAdapter.getDefaultAdapter().startDiscovery() 更新蓝牙发现;被打破

我有一个使用蓝牙并连接到设备的应用程序,找不到任何使用BluetoothAdapter.getDefaultAdapter().startDiscovery()的设备;它在发现之前运行良好。也试过其他应用程序,它也不适用于其他应用程序。但是我尝试配对的设备(Arduinobt-module)可以在Android设置中找到。知道我可以尝试什么吗?我实现了所有如http://developer.android.com/guide/topics/connectivity/bluetooth.html中所述的内容并且它在更新之前有效。 最佳答案

android - Android 中的蓝牙设备发现 -- startDiscovery()

目标:构建一个Android应用程序,用于发现范围内的BT设备的名称和地址,并将它们的值提交给网络服务。BT设备以前没有绑定(bind)到主机设备,我只是想边走边轮询所有内容。我做了什么:仔细阅读文档。实现了主机设备的BT适配器的本地实例。实现通知以在未启用BT时启用它。注册广播接收器和解析ACTION_FOUNDs来自startDiscovery()的Intent。在list中注册了BLUETOOTH和BLUETOOTH_ADMIN权限。在startDiscovery()之前一切正常(通过增量控制台日志记录测试)。沮丧:startDiscovery()--我怀疑我在错误的上下文中传递