getState(String profileName)
2 min
Get the current VPN state for the specified VPN profile.
Syntax:
int getState(String profileName)
Parameters:
The profileName is the name of the profile.
Returns:
The possible return values are:
public enum KnoxVpnState {
IDLE(1),
CONNECTING(2),
DISCONNECTING(3),
CONNECTED(4),
FAILED(5),
DELETED(6),
// State(s) defined by our app. To avoid conflict with KNOX state // definitions, we are starting the value from 101; PS_USER_SESSION_CREATED(101);
}When the return value is KnoxVpnState.FAILED, the caller can call getErrorString() to obtain a description of the VPN failure.