[英]Bluetooth connection without pairing
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.
谷歌商店有一款名为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".
您可以在Google商店中搜索名为“Bluehood Social Bluetooth”的应用。 https://play.google.com/store/apps/details?id=com.mobile.bluehood
https://play.google.com/store/apps/details?id=com.mobile.bluehood
You may create an insecure bluetooth serial connection between two devices. 您可以在两个设备之间创建不安全的蓝牙串行连接。
To create a connection: 要创建连接:
Identify the BluetoothDevice
and call its method createInsecureRfcommSocketToServiceRecord
识别
BluetoothDevice
并调用其方法createInsecureRfcommSocketToServiceRecord
To receive a connection: 要接收连接:
Get hold of BluetoothAdapter
and call the method listenUsingInsecureRfcommWithServiceRecord
获取
BluetoothAdapter
并调用listenUsingInsecureRfcommWithServiceRecord
方法
This technique won't require the devices to establish a connection using pairing code. 该技术不需要设备使用配对代码建立连接。 Its available in API level 10 and above.
它在API级别10及以上版本中可用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.