Android Open Source - droid-aegis Wifi Check






From Project

Back to project page droid-aegis.

License

The source code is released under:

MIT License

If you think the Android project droid-aegis listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package andi.cctv.app;
//from  w  w  w  . ja  va  2 s  . c  o  m
import android.net.wifi.WifiManager;
import android.util.Log;

public class WifiCheck {
  private static final String tag = "WifiCheck";
  
  public boolean enableWifi (WifiManager connMgr) {
    boolean connected = false;
    boolean wifi = connMgr.isWifiEnabled();
    if (wifi) {
      Log.d(tag, "WiFi is enabled. Do nothing");
    }
    else {
      Log.d(tag, "Wifi is disabled. Enable Wifi");
      if (connMgr.setWifiEnabled(true)) {
        Log.d(tag, "Wifi Enabled.");
        connected = true;
      }
    }
    return connected;
  }


}




Java Source Code List

andi.cctv.app.MainActivity.java
andi.cctv.app.MediaController.java
andi.cctv.app.Sockit.java
andi.cctv.app.ToFile.java
andi.cctv.app.WifiCheck.java
com.app.camstreamer.BufferHandler.java
com.app.camstreamer.BufferNotifications.java
com.app.camstreamer.BufferPool.java
com.app.camstreamer.MainActivity.java
com.app.camstreamer.MockCamera.java
com.app.camstreamer.StreamSock.java