如何通过蓝牙远程查询手机,是否支持PBAP与否? [英] How to query remote mobile phone via Bluetooth as to whether it supports PBAP or not?

查看:280
本文介绍了如何通过蓝牙远程查询手机,是否支持PBAP与否?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设两款Android手机都通过蓝牙配对和连接建立。如何以编程方式在客户确定远程设备(服务器)是否支持蓝牙配置文件,如PBAP?

Suppose two Android mobile phones are paired via Bluetooth and connection is established. How to programmatically determine at the client whether the remote device (the server) supports bluetooth profiles such as PBAP?

如果它不支持它,那么如何以编程方式启动与远程设备PBAP会话?

And if it does support it, then how to programmatically initiate a PBAP session with the remote device?

我已经广泛地搜查了净,至今一直无法找到相同的API支持和文档。因此,任何帮助或指导将非常AP preciated。

I have extensively searched the net and so far have been unable to find API support and documentation for the same. So any help or guidance would be very much appreciated.

编辑:会在获取远程设备的的UUID 在这里有什么用途?如果是的话,我怎么知道它是否支持PBAP从?

Would fetching the remote device's UUIDs be of any use here? If yes, how do I get to know whether it supports PBAP from that?

更新:我设法使用连接到远程设备:

UPDATE: I managed to connect to the remote device using:

mBluetoothSocket = mBluetoothDevice.createRfcommSocketToServiceRecord(applicationUUID);
                            btAdapter.cancelDiscovery();
                            mBluetoothSocket.connect();

其中,

 private UUID applicationUUID = UUID.fromString("0000111E-0000-1000-8000-00805F9B34FB");

有关免提配置文件模式。是否有通过连接任何此类固定的UUID PBAP 模式,但?

for hands free profile mode. Is there any such fixed UUID for connecting through PBAP mode though?

更新-2 :现在我能够配对使用UUID 0000112F,这是PSE访问UUID远程设备。当连接建立后,我得到的远程设备上的消息,询问我是否可以允许远程设备访问通话记录和联系人。我点击是的。

UPDATE-2: Now I am able to pair with the remote device using the UUID 0000112F, which is the UUID for PSE access. When the connection is established, I get a message on the remote device asking me whether I can allow remote device access to call logs and contacts. I click on yes.

推荐答案

我设法使用连接到远程设备:

I managed to connect to the remote device using:

mBluetoothSocket = mBluetoothDevice.createRfcommSocketToServiceRecord(applicationUUID);
                        btAdapter.cancelDiscovery();
                        mBluetoothSocket.connect();

其中,

 private UUID applicationUUID = UUID.fromString("0000112F-0000-1000-8000-00805F9B34FB");

我能够配对使用UUID 0000112F,这是PSE访问UUID远程设备。当连接建立后,我得到的远程设备上的消息,问我是否可以允许客户端访问通话记录和联系人。我点击是。 PBAP连接而成。

I am able to pair with the remote device using the UUID 0000112F, which is the UUID for PSE access. When the connection is established, I get a message on the remote device asking me whether I can allow client access to call logs and contacts. I click on yes. PBAP connection is made.

发布此作为参考的任何人在未来的这个挣扎。)

Posting this for reference to any person struggling with this in future :).

这篇关于如何通过蓝牙远程查询手机,是否支持PBAP与否?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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