Code example for WifiManager.WifiLock

Methods: setReferenceCounted

0
				.getSystemService(Context.WIFI_SERVICE);
		wifiManager.setWifiEnabled(true);
		this.wifiLock = wifiManager.createWifiLock(WIFI_MODE_WAKEUP, TAG
				+ ".wifilock"); 
		if (wifiLock != null)
			wifiLock.setReferenceCounted(false);
		this.executor = new TimedExecutor(context);
		this.wifiMeasurer = new WifiMeasurer();
	} 
 
	/** 
	 * This methods allows the caller to start one Wifi scan at the specified 
	 * time. 
	 *  
	 */ 
	@Override 
	public void startOneMeasureAt(long execTime) {
		cancelPendingMeasures(); 
		executor.schedule(execTime, wifiMeasurer);
//		Log.i(System.currentTimeMillis() + "\t" + TAG, 
Contextual code suggestions in your IDE  Get Codota for Java