Reputation: 1507
I'm writing an app on 2 devices, that pairs the 2 devices and sends a general message.
Whenever I start the pairing to the other device (even inside my own app on my other device) I get a prompt saying "do you want to pair device xxx"
(similar to this popup >)
and the user actually has to press on pair. so that the 2 devices would be paired.
assuming I'm having my own app on both phones, is there a way for me to pair them automatically without the other user would actually have to press on "Pair"?
Upvotes: 0
Views: 1269
Reputation: 46
Pairing without user interaction requires the BLUETOOTH_PRIVILEGED permission, which is not available to third-party developers / apps.
Quoting the documentation:
Allows applications to pair bluetooth devices without user interaction, and to allow or disallow phonebook access or message access. This is not available to third party applications.
Constant Value: "android.permission.BLUETOOTH_PRIVILEGED"
Upvotes: 3