我想在我的移动应用程序的两个实例之间传输文件(通过蓝牙使用 OBEX / OPP / FTP 配置文件),该应用程序在两个未配对的 Android 设备(未植根)上运行。这可能吗?
如果不是,我可以在没有用户交互的情况下配对设备并在传输完成后取消配对吗?我猜不是:
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**.
不过,我也找到了这个解释,所以很想得到纠正:
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.