Tiago
Tiago

Reputation: 1116

Is it possible to set pin programmatically for bluetooth pairing?

I have an application (however I'm testing using the sample bluetooth chat from the SDK) where two android devices connects each other, and exchange data.

I already have part of the pairing process hardcoded using the BT address, problem is: the dialog it appears to confirm the pin. Is there a way to make that work programmatically? The only thing that "appeared" to solve my problem was in this question, but that API is completely abandoned, has no documentation and many issues.

As fair as I know the problem is that if the device is not the device database with paired devices, without root access the standard API is always going to prompt the user, but I'm still wondering if there's a way.

Upvotes: 1

Views: 3176

Answers (1)

Yury
Yury

Reputation: 20936

Bluetooth autopairing is defined only for some devices. To change this you should rewrite Android framework. So, from the application, it seems to me, this is impossible to do.

Upvotes: 1

Related Questions