-
public final class NetworkTroubleshootingDataNetwork data collected only when needed for troubleshooting (e.g. request error callbacks). Not used for payload generation. Populated on demand via AFNetworkManager.getTroubleshootingData. Limited to: networkType, isVpnEnabled, hasInternetCapability, hasValidatedCapability, dataState, vpnUnderlyingTransport, devicePrivateVpnAddress, customDnsServerName, customDnsEnabled.
-
-
Field Summary
Fields Modifier and Type Field Description private final StringnetworkTypeprivate final BooleanisVpnEnabledprivate final BooleanhasInternetCapabilityprivate final BooleanhasValidatedCapabilityprivate final StringdataStateprivate final StringvpnUnderlyingTransportprivate final StringdevicePrivateVpnAddressprivate final StringcustomDnsServerNameprivate final BooleancustomDnsEnabled
-
Constructor Summary
Constructors Constructor Description NetworkTroubleshootingData(String networkType, Boolean isVpnEnabled, Boolean hasInternetCapability, Boolean hasValidatedCapability, String dataState, String vpnUnderlyingTransport, String devicePrivateVpnAddress, String customDnsServerName, Boolean customDnsEnabled)
-
Method Summary
Modifier and Type Method Description final StringgetNetworkType()final BooleangetIsVpnEnabled()final BooleangetHasInternetCapability()NET_CAPABILITY_INTERNET on active network. final BooleangetHasValidatedCapability()NET_CAPABILITY_VALIDATED on active network (e.g. final StringgetDataState()TelephonyManager data state: CONNECTED, DISCONNECTED, CONNECTING, SUSPENDED. final StringgetVpnUnderlyingTransport()When VPN is active: underlying transport the VPN runs over (WIFI, MOBILE, or UNKNOWN). final StringgetDevicePrivateVpnAddress()Local IP address of the VPN interface when VPN is active (e.g. final StringgetCustomDnsServerName()Private DNS server hostname when in strict mode. final BooleangetCustomDnsEnabled()Whether private DNS is active (strict or opportunistic). -
-
Method Detail
-
getNetworkType
final String getNetworkType()
-
getIsVpnEnabled
final Boolean getIsVpnEnabled()
-
getHasInternetCapability
final Boolean getHasInternetCapability()
NET_CAPABILITY_INTERNET on active network. Null if unavailable (e.g. API < 23 or no network).
-
getHasValidatedCapability
final Boolean getHasValidatedCapability()
NET_CAPABILITY_VALIDATED on active network (e.g. past captive portal). Null if unavailable (e.g. API < 23 or no network).
-
getDataState
final String getDataState()
TelephonyManager data state: CONNECTED, DISCONNECTED, CONNECTING, SUSPENDED. Null if unavailable.
-
getVpnUnderlyingTransport
final String getVpnUnderlyingTransport()
When VPN is active: underlying transport the VPN runs over (WIFI, MOBILE, or UNKNOWN). Null when VPN off or API < 21.
-
getDevicePrivateVpnAddress
final String getDevicePrivateVpnAddress()
Local IP address of the VPN interface when VPN is active (e.g. tun0). Null when VPN off or API < 21.
-
getCustomDnsServerName
final String getCustomDnsServerName()
Private DNS server hostname when in strict mode. Null if not configured or API < 28.
-
getCustomDnsEnabled
final Boolean getCustomDnsEnabled()
Whether private DNS is active (strict or opportunistic). Null if API < 28.
-
-
-
-