Code example for WifiManager.WifiLock

Methods: acquire

0
    if (autoResumeManagement) {
      videoView.start();
    } 
 
    if (wifiLock != null && !completed) {
      wifiLock.acquire();
    } 
  } 
 
  @Override 
  public void onPause() { 
    super.onPause(); 
 
    videoView.pause();
 
    if (wifiLock != null && wifiLock.isHeld()) {
      wifiLock.release();
    } 
  } 
 
  @Override