Android的蓝牙,覆盖配对提示 [英] Android bluetooth, override pairing prompts

查看:155
本文介绍了Android的蓝牙,覆盖配对提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设一个设备之前从未见过的另一设备,在此设置中,将了解它的设备的MAC地址的已与简单地尝试配对该设备,以确定它是否在范围现在

Assume a device has never seen another device before, in this setup it will know of its device mac address already and simply try to pair that device to determine if it is in range now

我如何重写配对对话?

推荐答案

我不认为你可以重写配对对话。

I don't think you can override the pairing dialogue.

不过,我认为这是可能做你正在尝试做的。如果您启动设备发现并注册接收ACTION_FOUND意图。
http://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_FOUND
请注意,这个意图给你发现的设备的名称。该RSSI可太 - 你可能会发现有用的。

But I think it is possible to do what you are trying to do. If you initiate a device discovery and register to receive the ACTION_FOUND intent. http://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_FOUND Note that this intent gives you the name of the discovered devices. The RSSI is available too - you might find that useful.

这样,你就可以判断你正在寻找设备是否在范围内没有配对(和没有出现配对对话)。

That way you can determine whether the device you are looking for is in range without pairing (and without a pairing dialogue appearing).

这篇关于Android的蓝牙,覆盖配对提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆