mirror of
https://github.com/adolfintel/OpenPods.git
synced 2026-09-14 14:56:11 -04:00
Fixed a problem in BLE detection
This commit is contained in:
@@ -25,7 +25,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
setContentView(R.layout.activity_main);
|
||||
//check if Bluetooth LE is available on this device. If not, show an error
|
||||
BluetoothAdapter btAdapter=((BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter();
|
||||
if(btAdapter==null||((BluetoothAdapter) btAdapter).getBluetoothLeScanner()==null){
|
||||
if(btAdapter==null||(btAdapter.isEnabled()&&btAdapter.getBluetoothLeScanner()==null)){
|
||||
Intent i=new Intent(this,NoBTActivity.class);
|
||||
startActivity(i);
|
||||
finish();
|
||||
|
||||
Reference in New Issue
Block a user