Code example for BluetoothAdapter

Methods: cancelDiscoverygetAddress

0
				  
				 timestamp = System.currentTimeMillis(); 
				  
				 // Printing row 
				 captureFile.println(timestamp 
						 	+ "," + bluetoothAdapter.getAddress() 
							+ "," + device.getAddress() 
							+ "," + String.valueOf(rssi)); 
				  
				  
				 Toast.makeText(getBaseContext(), "strength: " + 
						 rssi, Toast.LENGTH_SHORT).show(); 
				  
				  
			} 
			if (intent.getAction().equals( 
					BluetoothAdapter.ACTION_DISCOVERY_FINISHED)) { 
				bluetoothAdapter.cancelDiscovery(); 
			} 
 
		} 
	}; 
 
Connect your IDE to all the code out there  Get Codota for Java