是否可以通过OBEX在不成对的设备之间传输文件?

时间:2013-11-05 19:57:08

标签: android bluetooth obex

我想在我的移动应用程序的两个实例之间传输文件(使用蓝牙上的OBEX / OPP / FTP配置文件),这两个实例在两个未配对的Android设备上运行(没有生根)。这可能吗?

如果没有,我可以在没有用户交互的情况下配对设备,并在传输完成后取消配对吗?我在猜not

 public static final String BLUETOOTH  (Added in API level 1)

   Allows applications to connect to paired bluetooth devices. 

 public static final String BLUETOOTH_ADMIN  (Added in API level 1)

   Allows applications to discover and pair bluetooth devices.

 public static final String BLUETOOTH_PRIVILEGED  (Added in API level 19)

   Allows applications to pair bluetooth devices without user interaction. **This 
   is not available to third party applications**. 

尽管如此,我还发现this explanation所以我很乐意纠正:

BLUETOOTH is for connecting to devices that have already been paired in the 
bluetooth settings.  BLUETOOTH_ADMIN allows you to connect to any 
device -- paired or not.

1 个答案:

答案 0 :(得分:4)

看起来在某些时候没有用户交互的配对是可能的,从此判断:

How can I avoid or dismiss Android's Bluetooth pairing notification when I am doing programmatic pairing?

然而,看起来OP仍然出现了要求PIN的通知消息,他们无法解决这个问题。

OP所描述的基本方法似乎一直在研究2.3但我猜(并希望,因为它充满了巨大的安全风险)它已不再存在了。