https://developer.android.com/guide/topics/connectivity/bluetooth
使用Bluetooth APIs 可以做到:
Scan for other Bluetooth devices. 掃瞄藍芽裝置
Query the local Bluetooth adapter for paired Bluetooth devices. 查詢並配對
Establish RFCOMM channels. 建立通訊
Connect to other devices through service discovery. 使用Service 採索進行連線
Transfer data to and from other devices. 傳輸檔案
Manage multiple connections. 管理多裝置
使用藍芽連線主要有個步驟(基本要求工作):
Setting up Bluetooth.
Finding devices that are either paired or available in the local area.
Connecting devices.
Transferring data between devices.
在android.bluetooth 提供的功能,有以下幾個主要的類別:
連線時,主要兩個步驟: