NetworkMonitorAutoDetect

tee3.webrtc

## 类 NetworkMonitorAutoDetect

- java.lang.Object
- - android.content.BroadcastReceiver
  - - tee3.webrtc.NetworkMonitorAutoDetect

-     public class NetworkMonitorAutoDetect
      extends android.content.BroadcastReceiver

  Borrowed from Chromium's src/net/android/java/src/org/chromium/net/NetworkChangeNotifierAutoDetect.java Used by the NetworkMonitor to listen to platform changes in connectivity. Note that use of this class requires that the app have the platform ACCESS_NETWORK_STATE permission.

- - ### 嵌套类概要

    嵌套类
    限定符和类型 | 类和说明
    --- | ---
    `static class` | `NetworkMonitorAutoDetect.ConnectionType`
    `static class` | `NetworkMonitorAutoDetect.IPAddress`
    `static class` | `NetworkMonitorAutoDetect.NetworkInformation` Java version of NetworkMonitor.NetworkInformation
    `static interface` | `NetworkMonitorAutoDetect.Observer` Observer interface by which observer is notified of network changes.

    - ### 从类继承的嵌套类/接口 android.content.BroadcastReceiver

      `android.content.BroadcastReceiver.PendingResult`

  - ### 构造器概要

    构造器
    构造器和说明
    `NetworkMonitorAutoDetect(NetworkMonitorAutoDetect.Observer observer, android.content.Context context)` Constructs a NetworkMonitorAutoDetect.

  - ### 方法概要

    所有方法 静态方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `destroy()`
    `static NetworkMonitorAutoDetect.ConnectionType` | `getConnectionType(tee3.webrtc.NetworkMonitorAutoDetect.NetworkState networkState)`
    `tee3.webrtc.NetworkMonitorAutoDetect.NetworkState` | `getCurrentNetworkState()`
    `long` | `getDefaultNetId()` Returns NetID of device's current default connected network used for communication.
    `void` | `onReceive(android.content.Context context, android.content.Intent intent)`
    `boolean` | `supportNetworkCallback()`

    - ### 从类继承的方法 android.content.BroadcastReceiver

      `abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### NetworkMonitorAutoDetect

          public NetworkMonitorAutoDetect(NetworkMonitorAutoDetect.Observer observer,
                                          android.content.Context context)

      Constructs a NetworkMonitorAutoDetect. Should only be called on UI thread.

  - ### 方法详细资料

    - #### supportNetworkCallback

          public boolean supportNetworkCallback()

    - #### destroy

          public void destroy()

    - #### getCurrentNetworkState

          public tee3.webrtc.NetworkMonitorAutoDetect.NetworkState getCurrentNetworkState()

    - #### getDefaultNetId

          public long getDefaultNetId()

      Returns NetID of device's current default connected network used for communication. Only implemented on Lollipop and newer releases, returns INVALID_NET_ID when not implemented.

    - #### getConnectionType

          public static NetworkMonitorAutoDetect.ConnectionType getConnectionType(tee3.webrtc.NetworkMonitorAutoDetect.NetworkState networkState)

    - #### onReceive

          public void onReceive(android.content.Context context,
                                android.content.Intent intent)

      指定者:
        `onReceive` 在类中 `android.content.BroadcastReceiver`