com.nativex.advertiser
Class NetworkConnectionManager

java.lang.Object
  extended by com.nativex.advertiser.NetworkConnectionManager

public class NetworkConnectionManager
extends Object


Field Summary
private static Context context
           
private static NetworkConnectionManager instance
           
 
Constructor Summary
protected NetworkConnectionManager(Context context)
           
 
Method Summary
 boolean checkWifiAccessPermissions()
          Checks whether the application has provided permissions to access the wifi state.
static NetworkConnectionManager getInstance()
           
static NetworkConnectionManager getInstance(Context context)
           
 String getMacAddress()
          This method fetches a WLAN Mac Address, or null if the Mac Address is not available.
 WifiInfo getWifiInfo()
          Helper method, returns a WifiInfo instance or null if one cannot be accessed.
 boolean isConnected()
          Checks if the connection is currently available.
 boolean isConnectedToCellular()
           
 boolean isOnWiFi()
           
static void release()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

private static Context context

instance

private static NetworkConnectionManager instance
Constructor Detail

NetworkConnectionManager

protected NetworkConnectionManager(Context context)
Method Detail

getInstance

public static NetworkConnectionManager getInstance(Context context)

getInstance

public static NetworkConnectionManager getInstance()

isOnWiFi

public boolean isOnWiFi()

isConnectedToCellular

public boolean isConnectedToCellular()

isConnected

public boolean isConnected()
Checks if the connection is currently available.


checkWifiAccessPermissions

public boolean checkWifiAccessPermissions()
Checks whether the application has provided permissions to access the wifi state.


getMacAddress

public String getMacAddress()
This method fetches a WLAN Mac Address, or null if the Mac Address is not available.


getWifiInfo

public WifiInfo getWifiInfo()
Helper method, returns a WifiInfo instance or null if one cannot be accessed.


release

public static void release()