接受配对编程要求 - Android的蓝牙 [英] Accept pairing request programatically - Android Bluetooth

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

问题描述

一个远程设备发送我的应用程序的配对请求,它需要一个引脚输入配对(会出现一个对话框,要求输入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屋!

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