Code example for WifiManager.WifiLock

Methods: setReferenceCounted

0
		this.wifiManager = (WifiManager) context
				.getSystemService(Context.WIFI_SERVICE);
		this.wakeupMode = wakeupMode;
		this.wifiLock = wifiManager.createWifiLock(
				wakeupMode, TAG);
		wifiLock.setReferenceCounted(false);
		this.wifiScanner = new WifiScanner(wifiLock, this);
		this.timer = new PeriodicExecutor(context, wifiScanner);
		// this.locationLogger = null; 
	} 
 
	public void start(int interval) {
		uiHandler.appendToTerminal("Wifi measuring started.");
		scanInterval = interval * 1000;
		wifiManager.setWifiEnabled(true);
		context.registerReceiver(this, new IntentFilter(
				WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
		// try { 
		// locationLogger = new FileLogger(LOG_NAME); 
		// } catch (IOException ex) {