基本步驟: 獲取藍牙適配器bluetoothadapter blueadapter=bluetoothadapter.getdefaultadapter(); 如果bluetoothadapter 為null,說明android手機沒有藍牙模塊。 判斷藍牙模塊是否開啟,blueadapter.isenabled() true表示已經開啟,false表示藍牙并沒啟用。 啟動配置藍牙可見模式,即進入可配對模式intent in=new intent(bluetoothadapter.action_request_discoverable); in.putextra(bluetoothadapter.extra_discoverable_duration, 200); startactivity(in); ,200就表示200秒。 獲取藍牙適配器中已經配對的設備setdevice=blueadapter.getbondeddevices(); 還需要在androidmanifest.xml中聲明藍牙的權限 接下來就是根據自己的需求對bluetoothadapter 的操作了。