/**@class android.net.NetworkInfo implements android.os.Parcelable @extends java.lang.Object Describes the status of a network interface. <p>Use {@link android.net.ConnectivityManager#getActiveNetworkInfo()} to get an instance that represents the current network connection. @deprecated Callers should instead use the {@link android.net.ConnectivityManager.NetworkCallback} API to learn about connectivity changes, or switch to use {@link android.net.ConnectivityManager#getNetworkCapabilities} or {@link android.net.ConnectivityManager#getLinkProperties} to get information synchronously. Keep in mind that while callbacks are guaranteed to be called for every event in order, synchronous calls have no such constraints, and as such it is unadvisable to use the synchronous methods inside the callbacks as they will often not offer a view of networking that is consistent (that is: they may return a past or a future state with respect to the event being processed by the callback). Instead, callers are advised to only use the arguments of the callbacks, possibly memorizing the specific bits of information they need to keep from one callback to another. */ var NetworkInfo = { /***/ CREATOR : "null", /**Reports the type of network to which the info in this {@code NetworkInfo} pertains. @return {Number} one of {@link ConnectivityManager#TYPE_MOBILE}, {@link ConnectivityManager#TYPE_WIFI}, {@link ConnectivityManager#TYPE_WIMAX}, {@link ConnectivityManager#TYPE_ETHERNET}, {@link ConnectivityManager#TYPE_BLUETOOTH}, or other types defined by {@link ConnectivityManager}. @deprecated Callers should switch to checking {@link NetworkCapabilities#hasTransport} instead with one of the NetworkCapabilities#TRANSPORT_* constants : {@link #getType} and {@link #getTypeName} cannot account for networks using multiple transports. Note that generally apps should not care about transport; {@link NetworkCapabilities#NET_CAPABILITY_NOT_METERED} and {@link NetworkCapabilities#getLinkDownstreamBandwidthKbps} are calls that apps concerned with meteredness or bandwidth should be looking at, as they offer this information with much better accuracy. */ getType : function( ) {}, /** @deprecated Use {@link NetworkCapabilities} instead @hide */ setType : function( ) {}, /**Return a network-type-specific integer describing the subtype of the network. @return {Number} the network subtype @deprecated Use {@link android.telephony.TelephonyManager#getDataNetworkType} instead. */ getSubtype : function( ) {}, /** @hide */ setSubtype : function( ) {}, /**Return a human-readable name describe the type of the network, for example "WIFI" or "MOBILE". @return {String} the name of the network type @deprecated Callers should switch to checking {@link NetworkCapabilities#hasTransport} instead with one of the NetworkCapabilities#TRANSPORT_* constants : {@link #getType} and {@link #getTypeName} cannot account for networks using multiple transports. Note that generally apps should not care about transport; {@link NetworkCapabilities#NET_CAPABILITY_NOT_METERED} and {@link NetworkCapabilities#getLinkDownstreamBandwidthKbps} are calls that apps concerned with meteredness or bandwidth should be looking at, as they offer this information with much better accuracy. */ getTypeName : function( ) {}, /**Return a human-readable name describing the subtype of the network. @return {String} the name of the network subtype @deprecated Use {@link android.telephony.TelephonyManager#getDataNetworkType} instead. */ getSubtypeName : function( ) {}, /**Indicates whether network connectivity exists or is in the process of being established. This is good for applications that need to do anything related to the network other than read or write data. For the latter, call {@link #isConnected}() instead, which guarantees that the network is fully usable. @return {Boolean} {@code true} if network connectivity exists or is in the process of being established, {@code false} otherwise. @deprecated Apps should instead use the {@link android.net.ConnectivityManager.NetworkCallback} API to learn about connectivity changes. {@link ConnectivityManager#registerDefaultNetworkCallback} and {@link ConnectivityManager#registerNetworkCallback}. These will give a more accurate picture of the connectivity state of the device and let apps react more easily and quickly to changes. */ isConnectedOrConnecting : function( ) {}, /**Indicates whether network connectivity exists and it is possible to establish connections and pass data. <p>Always call this before attempting to perform data transactions. @return {Boolean} {@code true} if network connectivity exists, {@code false} otherwise. @deprecated Apps should instead use the {@link android.net.ConnectivityManager.NetworkCallback} API to learn about connectivity changes. See {@link ConnectivityManager#registerDefaultNetworkCallback} and {@link ConnectivityManager#registerNetworkCallback}. These will give a more accurate picture of the connectivity state of the device and let apps react more easily and quickly to changes. */ isConnected : function( ) {}, /**Indicates whether network connectivity is possible. A network is unavailable when a persistent or semi-persistent condition prevents the possibility of connecting to that network. Examples include <ul> <li>The device is out of the coverage area for any network of this type.</li> <li>The device is on a network other than the home network (i.e., roaming), and data roaming has been disabled.</li> <li>The device's radio is turned off, e.g., because airplane mode is enabled.</li> </ul> Since Android L, this always returns {@code true}, because the system only returns info for available networks. @return {Boolean} {@code true} if the network is available, {@code false} otherwise @deprecated Apps should instead use the {@link android.net.ConnectivityManager.NetworkCallback} API to learn about connectivity changes. {@link ConnectivityManager#registerDefaultNetworkCallback} and {@link ConnectivityManager#registerNetworkCallback}. These will give a more accurate picture of the connectivity state of the device and let apps react more easily and quickly to changes. */ isAvailable : function( ) {}, /**Sets if the network is available, ie, if the connectivity is possible. @param {Boolean} isAvailable the new availability value. @deprecated Use {@link NetworkCapabilities} instead @hide */ setIsAvailable : function( ) {}, /**Indicates whether the current attempt to connect to the network resulted from the ConnectivityManager trying to fail over to this network following a disconnect from another network. @return {Boolean} {@code true} if this is a failover attempt, {@code false} otherwise. @deprecated This field is not populated in recent Android releases, and does not make a lot of sense in a multi-network world. */ isFailover : function( ) {}, /**Set the failover boolean. @param {Boolean} isFailover {@code true} to mark the current connection attempt as a failover. @deprecated This hasn't been set in any recent Android release. @hide */ setFailover : function( ) {}, /**Indicates whether the device is currently roaming on this network. When {@code true}, it suggests that use of data on this network may incur extra costs. @return {Boolean} {@code true} if roaming is in effect, {@code false} otherwise. @deprecated Callers should switch to checking {@link NetworkCapabilities#NET_CAPABILITY_NOT_ROAMING} instead, since that handles more complex situations, such as VPNs. */ isRoaming : function( ) {}, /** @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_NOT_ROAMING} instead. {@hide} */ setRoaming : function( ) {}, /**Reports the current coarse-grained state of the network. @return {Object {android.net.NetworkInfo.State}} the coarse-grained state @deprecated Apps should instead use the {@link android.net.ConnectivityManager.NetworkCallback} API to learn about connectivity changes. {@link ConnectivityManager#registerDefaultNetworkCallback} and {@link ConnectivityManager#registerNetworkCallback}. These will give a more accurate picture of the connectivity state of the device and let apps react more easily and quickly to changes. */ getState : function( ) {}, /**Reports the current fine-grained state of the network. @return {Object {android.net.NetworkInfo.DetailedState}} the fine-grained state @deprecated Apps should instead use the {@link android.net.ConnectivityManager.NetworkCallback} API to learn about connectivity changes. See {@link ConnectivityManager#registerDefaultNetworkCallback} and {@link ConnectivityManager#registerNetworkCallback}. These will give a more accurate picture of the connectivity state of the device and let apps react more easily and quickly to changes. */ getDetailedState : function( ) {}, /**Sets the fine-grained state of the network. @param {Object {NetworkInfo.DetailedState}} detailedState the {@link DetailedState}. @param {String} reason a {@code String} indicating the reason for the state change, if one was supplied. May be {@code null}. @param {String} extraInfo an optional {@code String} providing addditional network state information passed up from the lower networking layers. @deprecated Use {@link NetworkCapabilities} instead. @hide */ setDetailedState : function( ) {}, /**Set the extraInfo field. @param {String} extraInfo an optional {@code String} providing addditional network state information passed up from the lower networking layers. @deprecated See {@link NetworkInfo#getExtraInfo}. @hide */ setExtraInfo : function( ) {}, /**Report the reason an attempt to establish connectivity failed, if one is available. @return {String} the reason for failure, or null if not available @deprecated This method does not have a consistent contract that could make it useful to callers. */ getReason : function( ) {}, /**Report the extra information about the network state, if any was provided by the lower networking layers. @return {String} the extra information, or null if not available @deprecated Use other services e.g. WifiManager to get additional information passed up from the lower networking layers. */ getExtraInfo : function( ) {}, /** */ toString : function( ) {}, /** */ describeContents : function( ) {}, /** */ writeToParcel : function( ) {}, };