Code example for BluetoothAdapter: Communicating over Bluetooth

Methods: cancelDiscoveryenablegetStateisDiscoveringstartDiscovery

0
		if(ba == null) {
			Log.d(SSC,"this user\'s device does not support bluetooth.");
			this.unregisterReceiver(br);
			logBT = false;
		} else { 
			if(ba.isDiscovering()) {
				ba.cancelDiscovery();
			} 
			ba.enable();
			ba.startDiscovery();
			Log.v(SSC,"BT STATE: " + ba.getState());
		} 
	} 
	 
	public void startAcc() { 
		sm = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
		List<Sensor> slist = sm.getSensorList(Sensor.TYPE_ACCELEROMETER);
		if(slist.size() <= 0) {
			Log.d(SSC,"this user\'s device does not support accelerometers");
			logAcc = false;
Connect your IDE to all the code out there  Get Codota for Java