code: function deviceFound(device)
  	{
  		// Parse advertisement data record.
  		// TODO: Move to startScan.
  		evothings.ble.parseAdvertisementData(device)
  
  		// For debugging, print advertisement data.
  		//console.log(JSON.stringify(device.advertisementData))
  
  		// Alternative way to identify the device by advertised service UUID.
  		/*
  		if (device.advertisementData.kCBAdvDataServiceUUIDs.indexOf(
  			'0000aa10-0000-1000-8000-00805f9b34fb') > -1)
  		{
  			showMessage('Found the TI SensorTag!')
  		}
  		*/
  
  		if (device.advertisementData.kCBAdvDataLocalName == 'CC2650 SensorTag')
  		{
  			showMessage('Found the TI SensorTag!')
  
  			// Stop scanning.
  			evothings.ble.stopScan()
  
  			// Connect.
  			connectToDevice(device)
  		}
  	}
docs: This function is called when a device is detected, here we check if we found the device we are looking for.