Code example for BluetoothAdapter

Methods: getScanMode

0
				btClick.start();	//Play SFX
				 
				 
	//			BattleMode.mIsHost = true; 
				 
				  if (mBluetoothAdapter.getScanMode() != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE)  {
					Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
					discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);
					startActivity(discoverableIntent);
				} 
				  else 
				  { 
					   
					  openIntent("com.sixteen.tetrisbattleandroid.BATTLEMODE");	 
					   
				  } 
				 
			} 
		}); 
		 
		//onclick btjoin