接受配对编程要求 - Android的蓝牙 [英] Accept pairing request programatically - Android Bluetooth
问题描述
一个远程设备发送我的应用程序的配对请求,它需要一个引脚输入配对(会出现一个对话框,要求输入PIN)。我有脚,我想编写一个程序,可以提供引脚的配对请求。
A remote device is sending my application a pairing request and it requires a pin to be entered for pairing (A dialog appears and asks for pin). I have the pin and I want to write a program that could provide the pin to the pairing request.
有人可以告诉我如何接受一个程序的配对请求,不知怎么不显示对话框,要求用户输入PIN码。
Can someone please tell me how to accept the pairing request in a program and somehow not show the dialog asking user to enter the pin.
推荐答案
由于Android 2.3.3有方法的:
Since Android 2.3.3 there are the methods:
createInsecureRfcommSocketToServiceRecord()
和
listenUsingInsecureRfcommWithServiceRecord()
在BluetoothAdapter。
in the BluetoothAdapter.
这篇关于接受配对编程要求 - Android的蓝牙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!