2010-11-01 239 views

回答

1

你現在不能輕鬆使用。由於該平臺隱藏了從你唯一的選擇就是前後

3

只要用戶按下藍牙配對請求屏幕取消檢查綁定設備列表中,

意圖與行動

android.bluetooth.BluetoothDevice.ACTION_BOND_STATE_CHANGED

被激發,並在它裏面,捆綁與詮釋鍵

android.bluetooth.BluetoothDevice.EXTRA_BOND_STATE

具有值

android.bluetooth BluetoothDevice.BONE_NONE

例如,登記廣播接收機爲動作後,取INT值如下。 然後您將知道用戶是否在配對屏幕上按下取消。

if (intent.getExtras().getInt(BluetoothDevice.EXTRA_BOND_STATE) == BluetoothDevice.BOND_NONE) { 
}