| | |
| | | import com.clj.fastble.data.ScanResult; |
| | | import com.moral.andbrickslib.baseadapter.headandfooter.DividerItemDecoration; |
| | | import com.moral.andbrickslib.baseadapter.recyclerview.MultiItemTypeAdapter; |
| | | import com.moral.yunfushao.MainApp; |
| | | import com.moral.yunfushao.R; |
| | | import com.moral.yunfushao.adapter.BleDeviceAdapter; |
| | | import com.moral.yunfushao.base.BaseActivity; |
| | |
| | | */ |
| | | if (mBluetoothService != null) { |
| | | mBluetoothService.cancelScan(); |
| | | /** |
| | | * 如果连接状态,断开重新连接 |
| | | */ |
| | | if(MainApp.theApp.bleManager!=null&&MainApp.theApp.bleManager.isConnected()){ |
| | | mBluetoothService.closeConnect(); |
| | | } |
| | | mBluetoothService.connectDevice(scanResultList.get(position)); |
| | | } |
| | | } |