Frage

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

How can I override the pairing dialogue?

War es hilfreich?

Lösung

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

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).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top