Android应用程序 - 蓝牙连接不配对 [英] Android App - BlueTooth Connection Without Pairing

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

问题描述

我一直在寻找找到一个方法来使用蓝牙进行连接两部手机,而不必首先对它们进行配对。我想省去了烦人的蓝牙弹出请求。有在谷歌商店,这是否叫Bluehood的应用程序。我想用一个应用程序我建立在一个完全不同的利基连接的那种风格。您可以搜索在谷歌商店叫Bluehood社会蓝牙应用程序。 https://play.google.com/store/apps/details ?ID = com.mobile.bluehood

I was looking to find a method to connect two phones using bluetooth without having to first pair them. I am trying to omit the annoying bluetooth pop up request. There is an app on the google store that does this called Bluehood. I wanted to use that style of connection for an app I am building in a totally different niche. You can search for the app on the google store called "Bluehood Social Bluetooth". https://play.google.com/store/apps/details?id=com.mobile.bluehood

推荐答案

您可以创建两个设备之间的不安全蓝牙串行连接。

You may create an insecure bluetooth serial connection between two devices.

要创建一个连接:

确定 BluetoothDevice类并调用其方法 createInsecureRfcommSocketToServiceRecord

接收连接:

弄个 BluetoothAdapter 和调用方法 listenUsingInsecureRfcommWithServiceRecord

此技术将不需要的设备来建立使用配对code的连接。它在API层面提供10以上。

This technique won't require the devices to establish a connection using pairing code. Its available in API level 10 and above.

这篇关于Android应用程序 - 蓝牙连接不配对的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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