Speedify SDK for Android
15.0.0
|
Main SDK API.
Instantiate an instance of SpeedifySDK in your Applications class. SpeedifySDK will run its VPN services in a separate process, which needs access to a properly configured SpeedifySDK instance for your app. All calls are non-blocking. Create a subclass of SpeedifyHandler or implement ISpeedifyHandler, and implement the methods for the various callbacks which you are interesed in. The SpeedifySDK will call to inform you of changes through these callbacks.
Classes | |
interface | AutoConstruct |
Interface for your Application class to provided automatic construction of the SpeedifySDK when needed. More... | |
class | StatsRunnable |
Public Member Functions | |
SpeedifySDK (@NonNull Context applicationContext, @NonNull String name) | |
Constructor for SpeedifySDK with default handler. More... | |
SpeedifySDK (@NonNull Context applicationContext, @NonNull String name, @NonNull ISpeedifyHandler handler) | |
Constructor for SpeedifySDK with provided handler. More... | |
final void | setAppName (@NonNull String name) |
Sets the app name used for autoaccounts and SDK-generated UI elements, such as the foreground notification. More... | |
final void | setHandler (@Nullable ISpeedifyHandler newHandler) |
Sets the main handler for event callbacks. More... | |
final void | restartServices () |
Ensures relevant services are started. More... | |
final void | connectAuto (AutoConnectMethod method) |
Connect to a server by an automatic selection method. More... | |
final void | connectProxy () |
Runs the Speedify VPN as a local proxy, without a connection to a remote server. More... | |
final void | connectByCountry (@NonNull String country) |
Connect to a server by server country. More... | |
final void | connectByCity (@NonNull String country, @NonNull String city) |
Connect to a server by server city. More... | |
final void | connectByServer (@NonNull String country, @NonNull String city, int num) |
Connect to a specific server. More... | |
final void | connectByServerExact (@NonNull String country, @NonNull String city, int num) |
Connect to a specific server, without fallback. More... | |
final void | setConnectMethodAuto (AutoConnectMethod method) |
Set the default connection method to an automatic selection method. More... | |
final void | setConnectMethodCountry (@NonNull String country) |
Set the default connection method to a specific country. More... | |
final void | setConnectMethodCity (@NonNull String country, @NonNull String city) |
Set the default connection method to a specific city. More... | |
final void | setConnectMethodServer (@NonNull String country, @NonNull String city, int num) |
Set the default connection method to a specific server. More... | |
final void | setConnectMethodServerExact (@NonNull String country, @NonNull String city, int num) |
Set the default connection method to a specific server, without fallback. More... | |
final void | disconnect () |
Disconnect from the server if connected, or cancel a connection attempt if currenty connecting. More... | |
final void | login (@NonNull String username, @NonNull String password) |
Authenticate a new user. More... | |
final void | loginOAuth (@NonNull String oauthAccessToken) |
Authenticate a new user using an oauth access token. More... | |
final void | refreshOAuthToken (String newOAuthAccessToken) |
Refreshes the current oauth access token. More... | |
final void | getActivationCode () |
Gets an activation code usable to login via the website. More... | |
final void | logout () |
Logout the current user. More... | |
final void | setMode (BondingMode mode) |
Change the basic mode of operation, between optimizing for speed or maximizing reliability. More... | |
final void | setConnectionPriorities (@NonNull String adapterID, ConnectionPriority priority) |
Change priorities of a connection. More... | |
final void | enableAutomaticConnectionPriority (boolean enabled) |
Set if automatic priority is allowed. More... | |
final void | setConnectionEncryption (@NonNull String adapterID, boolean encrypted) |
Change encryption settings per connection. More... | |
final void | setTunnelEncrypted (boolean encrypted) |
Sets encryption status on all connections forming the tunnels. More... | |
final void | setConnectionRateLimit (@NonNull String adapterID, long bps) |
Set the speed rate limit on a connection. More... | |
final void | resetConnectionRateLimit (@NonNull String adapterID) |
Reset the speed rate limit on a connection to unlimited. More... | |
final void | setOverflowThreshold (double mbpsOverflow) |
Set the overflow threshold. More... | |
final void | setPriorityOverflowThreshold (double mbpsOverflow) |
Set the priority overflow threshold, which is used when there is active priority traffic (i.e. More... | |
final void | setDirectoryDomain (@NonNull String domain) |
Change directory server used for user authentication and server management. More... | |
final void | setESNIEnabled (boolean enableEsni) |
Sets if ESNI is used when talking to the directory domain If using your own directory server, this must be called before login or loginAutoAccount. More... | |
final void | resetDirectoryDomain () |
Reset the directory server to defaults. More... | |
final void | setDirectoryGatewayURI (@NonNull String gatewayUri) |
Set an oauth gateway to use for directory server requests. More... | |
final void | resetDirectoryGatewayURI () |
Reset the directory oauth gateway to defaults. More... | |
final void | enableStatUpdates (boolean enabled, @Nullable List< Long > periods) |
Enable periodic connection stats, adapter list updates, session stats, and streaming stats to be sent while Speedify is connected. More... | |
final void | refreshHistoricConnectionStats () |
Gets historic tunnel stats for last 5 minutes. More... | |
final void | refreshSessionStats () |
Refreshes session stats. More... | |
final void | refreshStreamingStats () |
Refreshes streaming stats. More... | |
final void | refreshDirectory () |
Refresh a list of available servers from the directory list. More... | |
final void | refreshDirectorySettings () |
Refresh the current directory settings. More... | |
final void | refreshState () |
Refresh the current connection state and connected/last server. More... | |
final void | refreshNetworks () |
Refresh the list of current connection. More... | |
final void | refreshSettings () |
Refresh the current settings information. More... | |
final void | refreshConnectedServer () |
Requests information about the current connected VPN server Triggers OnConnectedServer. More... | |
final void | refreshAll () |
Shortcut to refresh all data. More... | |
final void | handleNewAdapter (@NonNull String adapterID) |
Acknowledge and clear message about a new adapter. More... | |
final void | handleAdapterOverlimit (@NonNull String adapterID) |
Acknowledge and clear message about an overlimit adapter. More... | |
final void | addAdapterDailyDataLimitBoost (@NonNull String adapterID, long additionalBytes) |
Adds additional bytes to the adapter's daily data usage limit for today. More... | |
final void | setAdapterDailyDataLimit (@NonNull String adapterID, long allowedBytes) |
Set the data usage, in bytes, allowed on this adapter in a single day. More... | |
final void | disableAdapterDailyDataLimit (@NonNull String adapterID) |
Sets the adapter to unlimited daily data usage. More... | |
final void | setAdapterMonthlyDataLimit (@NonNull String adapterID, long allowedBytes, long resetDay) |
Set the data usage, in bytes, allowed on this adapter in a single month. More... | |
final void | disableAdapterMonthlyDataLimit (@NonNull String adapterID) |
Sets the adapter to unlimited daily data usage. More... | |
final void | setExcludedIPRanges (@NonNull List< IPRange > excludedRanges) |
Set IP address ranges to exclude from going over the VPN tunnel. More... | |
final void | setExcludeDefaultPrivateIPRanges (boolean exclude) |
Set whether the default private IP ranges are excluded from going over the VPN tunnel. More... | |
final void | setIPLeakProtection (boolean enabled) |
Sets if IP Leak protection is enabled. More... | |
final void | setEnableDefaultRoute (boolean enable) |
Set whether the default route (0.0.0.0/0) goes over the VPN tunnel. More... | |
final void | setJumboPackets (boolean useJumbo) |
Sets whether to allow jumbo packets over the VPN tunnel. More... | |
final void | setConnectionTransportMode (TransportMode transportMode) |
Sets the transport mode selection used for each connection. More... | |
final void | setAllowChaChaEncryption (boolean allowChaCha) |
Allow or disallow use of ChaCha for connection encryptions. More... | |
final void | setAdapterOverlimitRatelimit (@NonNull String adapterID, long bps) |
Sets how to handle an adapter that has hit its daily or monthly data limit. More... | |
final void | resetAdapterUsage (@NonNull String adapterID) |
Resets the tracked data usage on an adapter. More... | |
final void | loginAutoAccount () |
Logs out of any current account and logs in to an automatically generated account for this device. More... | |
final void | loginLocalLoopbackOnly () |
Comcast Loopback Function. More... | |
final void | accountCheck (@NonNull String email) |
Check if there is already an account using this email address. More... | |
final void | accountCreate (@NonNull String email, @NonNull String password) |
Create a new account using this email address. More... | |
final void | accountPasswordChange (@NonNull String email, @NonNull String originalPassword, @NonNull String newPassword) |
Change the password on the account. More... | |
final void | refreshNonVPNApplications () |
Refreshes list of applications that should not go over the VPN. More... | |
final void | setNonVPNApplications (@NonNull List< String > nonVpnApps) |
Set applications that should not go over the VPN. More... | |
final void | refreshAccounting () |
Refresh account data. More... | |
final void | refreshPrivacy () |
Refresh privacy settings. More... | |
final void | setDoNotStoreCredentials (boolean doNotStore) |
Sets if credentials will not be stored. More... | |
final void | setReportingEncryptionKey (@Nullable String key128bit) |
Set reporting encryption key. More... | |
final void | setDisconnectOnExit (boolean shouldDisconnect) |
Sets the behavior of the VPN service upon task swipe/close all. More... | |
final void | setNeverExitOnSwipe (boolean neverExitOnSwipe) |
Setting this disables all disconnect/exit on swipe logic. More... | |
final void | setDNSServers (@NonNull List< String > dnsAddrs) |
Set IP addresses of the DNS servers to use Current value available from OnPrivacySettings. More... | |
final void | setForwardPorts (@NonNull List< ForwardedPort > ports) |
Set ports to be forwarded to this client when connected to a dedicated server. More... | |
final void | setDownstreamSubnets (@NonNull List< Subnet > subnets) |
Set the downstream subnets available on this device. More... | |
final void | setLocalVendorSettings (@NonNull JSONObject settings, boolean merge) |
Set local vendor settings Current value available from OnLocalVendorSettings. More... | |
final void | refreshLocalVendorSettings () |
Gets the local vendor settings Triggers OnLocalVendorSettings. More... | |
final void | refreshRemoteVendorSettings () |
Gets the remote vendor settings Triggers OnRemoteVendorSettings. More... | |
final void | setVendorUserData (@Nullable String vendorUserData) |
Set vendor user data Current value available from OnVendorUserData. More... | |
final void | refreshVendorUserData () |
Gets the vendor user data Triggers OnVendorUserData. More... | |
final void | refreshLocalProxy () |
Get configuration of the local proxy Triggers OnLocalProxySettings. More... | |
final void | setLocalProxyEnabled (boolean enabled) |
Enables or disables the local proxy. More... | |
final void | setLocalProxyMatchMode (ProxyMatchMode matchMode) |
Set the match mode used by the local proxy. More... | |
final void | setLocalProxyDomains (@NonNull List< String > domains) |
Set domains to proxy locally, instead of going through the VPN. More... | |
final void | setLocalProxyPackages (@NonNull List< String > packages) |
Set packages route around the vpn, instead of going through the VPN. More... | |
final void | setLocalProxyIPv4 (@NonNull List< String > ipv4) |
Set IPv4 address to proxy locally, instead of going through the VPN. More... | |
final void | setLocalProxyIPv6 (@NonNull List< String > ipv6) |
Set IPv6 address to proxy locally, instead of going through the VPN. More... | |
final void | setLocalProxyPorts (@NonNull List< LocalProxyPort > ports) |
Set ports to proxy. More... | |
final void | setLocalProxyDomainWatchlist (@NonNull List< LocalProxyDomainWatchlistItem > domainWatchlist) |
Set domain watchlist settings for the local proxy If connected, this triggers a reconnect. More... | |
final void | setLocalProxyDomainWatchlistEnable (@NonNull String title, boolean enabled) |
Toggle a single domain watchlist item from being enabled over the local proxy. More... | |
final void | setLocalProxyGlobalDomainWatchlistEnable (boolean watchlistEnabled) |
Sets if settings in the local proxy domain watchlist entries are applied. More... | |
final void | resetLocalProxyDomainWatchlist () |
Resets the local proxy domain watchlist entries to their default settings Triggers OnLocalProxySettings. More... | |
final void | refreshCaptivePortals () |
Checks connected networks for captive portals Triggers OnCaptivePortals. More... | |
final void | enableCaptivePortalMode (@NonNull String adapterID) |
Enable captive portal mode, sending all traffic over the specified network. More... | |
final void | disableCaptivePortalMode () |
Disable captive portal mode. More... | |
final void | refreshFirewall () |
Get configuration of the firewall Triggers OnFirewallSettings. More... | |
final void | setFirewallMode (FirewallMode mode) |
Set the mode used by the firewall. More... | |
final void | setFirewallDomains (@NonNull List< String > domains) |
Set domains to firewall. More... | |
final void | setFirewallIPv4 (@NonNull List< String > ipv4) |
Set IPv4 address to firewall. More... | |
final void | setFirewallIPv6 (@NonNull List< String > ipv6) |
Set IPv6 address to firewall. More... | |
final void | setFirewallPorts (@NonNull List< FirewallPort > ports) |
Set ports to firewall. More... | |
final void | refreshStreamingSettings () |
Get configuration of streaming settings. More... | |
final void | setStreamingDomains (@NonNull List< String > domains) |
Set domains to be identified as streams. More... | |
final void | setStreamingIPv4 (@NonNull List< String > ipv4) |
Set IPv4 address to identified as streams. More... | |
final void | setStreamingIPv6 (@NonNull List< String > ipv6) |
Set IPv6 address to identified as streams. More... | |
final void | setStreamingPorts (@NonNull List< StreamingPort > ports) |
Set ports to identified as streams. More... | |
final void | setKillswitch (boolean enabled) |
Sets if Internet Killswitch should be enabled. More... | |
final void | setRequestToDisableDoH (boolean disableDoH) |
Requests that browsers do not use DNS over HTTPS. More... | |
final void | setStartupConnect (boolean enabled) |
Set if Speedify should autmatically connect when the daemon starts. More... | |
final void | refreshLastDisconnectEvent () |
Get the last session disconnect event Triggers OnLastDisconnectEvent. More... | |
final void | refreshLogSettings () |
Get the current log settings Triggers OnLogSettings. More... | |
final void | setDaemonLogSettings (@NonNull DaemonLogSettings daemon) |
Set daemon log file settings Triggers OnLogSettings. More... | |
final void | eraseAllLogFiles () |
Erase all log files and log zips. More... | |
final void | setHeaderCompression (boolean enable) |
Sets whether to allow header compression of packets over the VPN tunnel. More... | |
final boolean | hasVPNPermission () |
Checks if the SDK currently has VPN permission. More... | |
final void | initializeVPNPermission () |
Requests VPN permission from the user through the system VPN dialog Triggers OnVPNPermissionResult. More... | |
final void | setLanguage (@NonNull String language) |
Set the language used for error messages Triggers OnSettings. More... | |
final void | startSpeedTest () |
Starts a new speed test Triggers OnSpeedTestResults. More... | |
final void | startStreamTest () |
Starts a new speed test Triggers OnSpeedTestResults. More... | |
final void | refreshSpeedTestResults () |
Gets last 5 speed test results Triggers OnSpeedTestResults. More... | |
final void | refreshNetworkSharingSettings () |
Gets the current network sharing settings Triggers OnNetworkSharingSettings. More... | |
final void | setNetworkSharingClientEnabled (boolean enabled) |
Sets whether network sharing client will be active. More... | |
final void | setNetworkSharingHostEnabled (boolean enabled) |
Sets whether network sharing host will be active. More... | |
final void | setNetworkSharingDisplayName (String displayName) |
Sets the display name of this device. More... | |
final void | connectToNetworkShareViaConnectCode (NetworkSharing.ConnectCode connectCode) |
Connects to a network share manually via a connect code. More... | |
final void | reconnectToNetworkShare (NetworkSharing.PeerUuid peerUuid) |
Reconnects to a previously authenticated network share. More... | |
final void | startNetworkSharingDiscovery () |
Manually start (or restart) a discovery session. More... | |
final void | refreshNetworkSharingDiscovery () |
Get the state of network sharing discovery. More... | |
final void | refreshNetworkSharesAvailable () |
Gets the discovered network shares Triggers OnNetworkSharesAvailable. More... | |
final void | setNetworkSharingPeerAutoReconnect (NetworkSharing.PeerUuid peerUuid, boolean allowed) |
Sets whether this device should automatically reconnect on discovery to a known network share. More... | |
final void | setNetworkSharingPeerAllowAsHost (NetworkSharing.PeerUuid peerUuid, boolean allowed) |
Sets whether or not the peer at the given UUID may be treated as a host, i.e. More... | |
final void | setNetworkSharingPeerAllowAsClient (NetworkSharing.PeerUuid peerUuid, boolean allowed) |
Sets whether or not the peer at the given UUID may be treated as a client, i.e. More... | |
final void | unpairNetworkSharingPeer (NetworkSharing.PeerUuid peerUuid) |
Unpair from a device at the given UUID. More... | |
final void | requestNetworkSharingPair (NetworkSharing.PeerUuid peerUuid) |
Initiate a pair request with the specified peer. More... | |
final void | allowNetworkSharingPair (NetworkSharing.PeerUuid peerUuid, boolean allowed) |
Allow or deny a pair request from the specified peer. More... | |
final void | setNetworkSharingPairRequestBehavior (NetworkSharing.PairRequestBehavior behavior) |
Sets the behavior of pair requests from peers. More... | |
final void | setNetworkSharingSameUserAutoPair (boolean allow) |
Sets if devices from the same user are automatically paired. More... | |
final void | setNetworkSharingAutoPairBehavior (NetworkSharing.AutoPairBehavior behavior) |
Sets if and how devices are automatically paired when discovered. More... | |
final void | setUlpReportIntervalSeconds (long interval) |
Sets the ULP reporting inverval in seconds. More... | |
final void | setMaximumConnectRetry (int timeout) |
Speedify follows a backoff pattern for repeated errors when logging in or connecting to VPN servers. More... | |
final void | setMaximumTransportRetry (int timeout) |
When Speedify fails to establish VPN transport connections over an Internet connection, it will use a backoff pattern to wait before attempting to establish a transport over that connection again. More... | |
final void | sendFeedback (String feedback) |
Generates new ulp data report with feedback message attached. More... | |
final void | sendLogReport (String email, String message, File file) |
Sends a log report to the Speedify team. More... | |
final void | sendMessage (String messageType, JSONObject data) |
final void | sendMessage (String messageType, JSONArray data) |
final void | sendMessage (String messageType) |
final boolean | isBackgroundProcess () |
Test if currently in sdk background process (:vpnservice). More... | |
void | destroy () |
Destroys this instance of the SpeedifySDK. More... | |
final void | registerSdkStateReceiver (@NonNull ISdkStateReceiver handler) |
Register a receiver for SpeedifySDK state changes. More... | |
final void | unregisterSdkStateReceiver (@NonNull ISdkStateReceiver handler) |
Unregister a receiver for SpeedifySDK state changes. More... | |
final void | registerWsMessageHandler (IWsHandler handler) |
Static Public Member Functions | |
static SpeedifySDK | getInstance (@Nullable Context context) |
Gets the current SpeedifySDK instance. More... | |
static SpeedifySDK | getInstance () |
Gets the current SpeedifySDK instance. More... | |
static boolean | isSdkAlive () |
Check if there is an active instance of the Speedify SDK. More... | |
static final String | Version () |
SpeedifySDK version. More... | |
static boolean | hasVPNPermission (Context appContext) |
Checks if the SDK currently has VPN permission. More... | |
static void | initializeVPNPermission (Context appContext) |
Requests VPN permission from the user through the system VPN dialog Triggers OnVPNPermissionResult. More... | |
static void | subscribeToEvent (String event) |
internal use More... | |
static boolean | IsBackgroundProcess (@NonNull Application application) |
Test if currently in sdk background process (:vpnservice). More... | |
static boolean | IsBackgroundProcess (@NonNull Context context) |
Test if currently in sdk background process (:vpnservice). More... | |
static void | ForceExit (@NonNull Context context) |
Force Speedify SDK to exit and all SpeedifySDK objects to cleanup themselves. More... | |
Public Attributes | |
final MultiReceiverManager< ISdkStateReceiver > | sdkStateReceivers = new MultiReceiverManager<ISdkStateReceiver>() |
Registers a new SDK state receiver Receivers are WeakReferenced, so you must keep a reference to the receiver. More... | |
final MultiReceiverManager< IForegroundServiceStateReceiver > | foregroundServiceReceivers = new MultiReceiverManager<IForegroundServiceStateReceiver>() |
Registers a new foreground service event receiver. More... | |
Static Public Attributes | |
static boolean | EnableSDKHandlerFromBackground = false |
Enables ISdkStateReceiver callbacks for to be used from the sdk background process (:vpnservice). More... | |
Protected Member Functions | |
Context | getApplicationContext () |
void | onMessage (String messageType, JSONArray data) |
internal use More... | |
void | onMessage (String messageType, JSONObject data) |
internal use More... | |
void | onMessage (String messageType) |
internal use More... | |
com.speedify.speedifysdk.SpeedifySDK.SpeedifySDK | ( | @NonNull Context | applicationContext, |
@NonNull String | name | ||
) |
Constructor for SpeedifySDK with default handler.
This should be called from AutoConstruct#getSpeedifySDK. SpeedifySDK will start a second process for running the VPN service, and will need access to data from this object.
applicationContext | Application Context |
name | Name of the application. Used in notifications. |
com.speedify.speedifysdk.SpeedifySDK.SpeedifySDK | ( | @NonNull Context | applicationContext, |
@NonNull String | name, | ||
@NonNull ISpeedifyHandler | handler | ||
) |
Constructor for SpeedifySDK with provided handler.
This should be called from AutoConstruct#getSpeedifySDK. SpeedifySDK will start a second process for running the VPN service, and will need access to data from this object.
applicationContext | Application Context |
name | Name of the application. Used in notifications. |
handler | Main handler for event callbacks |
final void com.speedify.speedifysdk.SpeedifySDK.accountCheck | ( | @NonNull String | ) |
Check if there is already an account using this email address.
Triggers OnAccountCheckResult.
account to check for |
final void com.speedify.speedifysdk.SpeedifySDK.accountCreate | ( | @NonNull String | email, |
@NonNull String | password | ||
) |
Create a new account using this email address.
Triggers OnAccountCreateResult.
account to create | |
password | password of the new account |
final void com.speedify.speedifysdk.SpeedifySDK.accountPasswordChange | ( | @NonNull String | email, |
@NonNull String | originalPassword, | ||
@NonNull String | newPassword | ||
) |
Change the password on the account.
Triggers OnPasswordChangeResult.
account to change | |
originalPassword | original password of the account |
newPassword | new password of the account |
final void com.speedify.speedifysdk.SpeedifySDK.addAdapterDailyDataLimitBoost | ( | @NonNull String | adapterID, |
long | additionalBytes | ||
) |
Adds additional bytes to the adapter's daily data usage limit for today.
This value is not added to the base daily data usage limit. Current value available on AdapterData objects returned from OnAdaptersList.
adapterID | ID of the adapterID |
additionalBytes | additional bytes that may be used today |
final void com.speedify.speedifysdk.SpeedifySDK.allowNetworkSharingPair | ( | NetworkSharing.PeerUuid | peerUuid, |
boolean | allowed | ||
) |
Allow or deny a pair request from the specified peer.
peerUuid | The UUID of the device requesting the pair |
allowed | Whether to allow or deny the pair request Triggers OnNetworkSharesAvailable. |
final void com.speedify.speedifysdk.SpeedifySDK.connectAuto | ( | AutoConnectMethod | method | ) |
Connect to a server by an automatic selection method.
If already connected, this will disconnect before reconnecting. Connect errors will be signalled in OnConnectError. Chosen server will be signalled via OnConnectedServer as connections to them are attempted.
method | how to choose a server |
final void com.speedify.speedifysdk.SpeedifySDK.connectByCity | ( | @NonNull String | country, |
@NonNull String | city | ||
) |
Connect to a server by server city.
If already connected, this will disconnect before reconnecting. A list of valid servers can be obtained from OnDirectory. Connect errors will be signalled in OnConnectError. Chosen server will be signalled via OnConnectedServer as connections to them are attempted.
country | 2-char ISO country code |
city | city name |
final void com.speedify.speedifysdk.SpeedifySDK.connectByCountry | ( | @NonNull String | country | ) |
Connect to a server by server country.
If already connected, this will disconnect before reconnecting. A list of valid servers can be obtained from OnDirectory. Connect errors will be signalled in OnConnectError. Chosen server will be signalled via OnConnectedServer as connections to them are attempted.
country | 2-char ISO country code |
final void com.speedify.speedifysdk.SpeedifySDK.connectByServer | ( | @NonNull String | country, |
@NonNull String | city, | ||
int | num | ||
) |
Connect to a specific server.
If already connected, this will disconnect before reconnecting. A list of valid servers can be obtained from OnDirectory. Connect errors will be signalled in OnConnectError. Chosen server will be signalled via OnConnectedServer as connections to them are attempted.
country | 2-char ISO country code |
city | city name |
num | server number |
final void com.speedify.speedifysdk.SpeedifySDK.connectByServerExact | ( | @NonNull String | country, |
@NonNull String | city, | ||
int | num | ||
) |
Connect to a specific server, without fallback.
If already connected, this will disconnect before reconnecting. A list of valid servers can be obtained from OnDirectory. Connect errors will be signalled in OnConnectError. Chosen server will be signalled via OnConnectedServer as connections to them are attempted.
country | 2-char ISO country code |
city | city name |
num | server number |
final void com.speedify.speedifysdk.SpeedifySDK.connectProxy | ( | ) |
Runs the Speedify VPN as a local proxy, without a connection to a remote server.
If already connected, this will disconnect before reconnecting. Connect errors will be signalled in OnConnectError.
final void com.speedify.speedifysdk.SpeedifySDK.connectToNetworkShareViaConnectCode | ( | NetworkSharing.ConnectCode | connectCode | ) |
Connects to a network share manually via a connect code.
Used on remote clients.
connectCode | the hostConnectCode of the host Triggers OnNetworkSharesAvailable. |
void com.speedify.speedifysdk.SpeedifySDK.destroy | ( | ) |
Destroys this instance of the SpeedifySDK.
This does not stop the service. NOTE : This instance of the SpeedifySDK object becomes invalid. You must create a new SpeedifySDK object after calling this.
final void com.speedify.speedifysdk.SpeedifySDK.disableAdapterDailyDataLimit | ( | @NonNull String | adapterID | ) |
Sets the adapter to unlimited daily data usage.
This is a wrapper for setAdapterDailyDataLimit(adapterID,0). Current value available on AdapterData objects returned from OnAdaptersList.
adapterID | ID of the adapterID |
final void com.speedify.speedifysdk.SpeedifySDK.disableAdapterMonthlyDataLimit | ( | @NonNull String | adapterID | ) |
Sets the adapter to unlimited daily data usage.
This is a wrapper for setAdapterMonthlyDataLimit(adapterID,0,0). Current value available on AdapterData objects returned from OnAdaptersList.
adapterID | ID of the adapterID |
final void com.speedify.speedifysdk.SpeedifySDK.disableCaptivePortalMode | ( | ) |
Disable captive portal mode.
final void com.speedify.speedifysdk.SpeedifySDK.disconnect | ( | ) |
Disconnect from the server if connected, or cancel a connection attempt if currenty connecting.
final void com.speedify.speedifysdk.SpeedifySDK.enableAutomaticConnectionPriority | ( | boolean | enabled | ) |
Set if automatic priority is allowed.
Current settings available from OnSettings.
enabled | if allowed |
final void com.speedify.speedifysdk.SpeedifySDK.enableCaptivePortalMode | ( | @NonNull String | adapterID | ) |
Enable captive portal mode, sending all traffic over the specified network.
adapterID | network to operate captive portal mode over |
final void com.speedify.speedifysdk.SpeedifySDK.enableStatUpdates | ( | boolean | enabled, |
@Nullable List< Long > | periods | ||
) |
Enable periodic connection stats, adapter list updates, session stats, and streaming stats to be sent while Speedify is connected.
Triggers OnConnectionStats once per second while connected. Triggers OnAdaptersList once every 30 seconds while connected. Triggers OnSessionStats once per second while connected. Triggers OnStreamingStats once per second while connected.
enabled | if connection stat updates should be continuously received |
periods | timeframes of requested session stats, values in hours, PERIOD_CURRENT for current, PERIOD_TOTAL for total, or empty/null for previously configured periods |
final void com.speedify.speedifysdk.SpeedifySDK.eraseAllLogFiles | ( | ) |
Erase all log files and log zips.
Note that the current active log file is not erased.
|
static |
Force Speedify SDK to exit and all SpeedifySDK objects to cleanup themselves.
NOTE : Any SpeedifySDK object you have previously contructed will become unuseable after this. You must construct a new SpeedifySDK object or call restartServices on the old one.
context | context to issue the broadcast on |
final void com.speedify.speedifysdk.SpeedifySDK.getActivationCode | ( | ) |
Gets an activation code usable to login via the website.
If setting a custom directory, call SpeedifySDK_SetDirectoryDomain() before calling this.
|
protected |
|
static |
Gets the current SpeedifySDK instance.
If there is no current instance and a context is passed, a new SpeedifySDK instance is created. The application context will always be used when creating a SpeedifySDK from this call.
context | Context used to create the sdk object. |
|
static |
final void com.speedify.speedifysdk.SpeedifySDK.handleAdapterOverlimit | ( | @NonNull String | adapterID | ) |
Acknowledge and clear message about an overlimit adapter.
adapterID | ID of the adapterID |
final void com.speedify.speedifysdk.SpeedifySDK.handleNewAdapter | ( | @NonNull String | adapterID | ) |
Acknowledge and clear message about a new adapter.
adapterID | ID of the adapterID |
final boolean com.speedify.speedifysdk.SpeedifySDK.hasVPNPermission | ( | ) |
Checks if the SDK currently has VPN permission.
|
static |
Checks if the SDK currently has VPN permission.
appContext | application context |
final void com.speedify.speedifysdk.SpeedifySDK.initializeVPNPermission | ( | ) |
Requests VPN permission from the user through the system VPN dialog Triggers OnVPNPermissionResult.
|
static |
Requests VPN permission from the user through the system VPN dialog Triggers OnVPNPermissionResult.
|
static |
Test if currently in sdk background process (:vpnservice).
application | an android Application |
final boolean com.speedify.speedifysdk.SpeedifySDK.isBackgroundProcess | ( | ) |
Test if currently in sdk background process (:vpnservice).
|
static |
Test if currently in sdk background process (:vpnservice).
context | an android Context |
|
static |
Check if there is an active instance of the Speedify SDK.
final void com.speedify.speedifysdk.SpeedifySDK.login | ( | @NonNull String | username, |
@NonNull String | password | ||
) |
Authenticate a new user.
If setting a custom directory, call setDirectoryDomain before calling this. Login errors will be signalled in OnLoginError.
username | Username of the user you wish to authenticate |
password | Password of the user you wish to authenticate |
final void com.speedify.speedifysdk.SpeedifySDK.loginAutoAccount | ( | ) |
Logs out of any current account and logs in to an automatically generated account for this device.
If setting a custom directory, call setDirectoryDomain before calling this. This may take several seconds as the OS is queryied for the device id. Login or auto-account creation errors will be signalled in OnLoginError. Automatic accounts have an email address in the form of <platform>.<deviceID>@autoaccount.speedify.com.
final void com.speedify.speedifysdk.SpeedifySDK.loginLocalLoopbackOnly | ( | ) |
Comcast Loopback Function.
final void com.speedify.speedifysdk.SpeedifySDK.loginOAuth | ( | @NonNull String | oauthAccessToken | ) |
Authenticate a new user using an oauth access token.
The application is responsible for fetching updated access tokens if using this method. If setting a custom directory, call setDirectoryDomain before calling this. Login errors will be signalled in OnLoginError. An expired access token will give an error of type TOKEN_EXPIRED, while invalid tokens will give CREDENTIAL.
oauthAccessToken | Access token for the user you wish to authenticate |
final void com.speedify.speedifysdk.SpeedifySDK.logout | ( | ) |
|
protected |
internal use
messageType | the message identifier |
data | json array of message data |
|
protected |
internal use
messageType | the message identifier |
data | json object of message data |
|
protected |
internal use
messageType | the message identifier |
final void com.speedify.speedifysdk.SpeedifySDK.reconnectToNetworkShare | ( | NetworkSharing.PeerUuid | peerUuid | ) |
Reconnects to a previously authenticated network share.
Used on remote clients.
peerUuid | the uuid of the host Triggers OnNetworkSharesAvailable. |
final void com.speedify.speedifysdk.SpeedifySDK.refreshAccounting | ( | ) |
final void com.speedify.speedifysdk.SpeedifySDK.refreshAll | ( | ) |
Shortcut to refresh all data.
Recommended to call when starting up or reshowing a UI. Triggers OnState, OnAccountingData, OnConnectedServer, OnAdaptersList, OnDirectory, OnSettings, OnPrivacySettings, OnLocalVendorSettings, OnRemoteVendorSettings, OnVendorUserData, OnLocalProxySettings, OnFirewallSettings, OnStreamingSettings.
final void com.speedify.speedifysdk.SpeedifySDK.refreshCaptivePortals | ( | ) |
Checks connected networks for captive portals Triggers OnCaptivePortals.
final void com.speedify.speedifysdk.SpeedifySDK.refreshConnectedServer | ( | ) |
Requests information about the current connected VPN server Triggers OnConnectedServer.
final void com.speedify.speedifysdk.SpeedifySDK.refreshDirectory | ( | ) |
final void com.speedify.speedifysdk.SpeedifySDK.refreshDirectorySettings | ( | ) |
final void com.speedify.speedifysdk.SpeedifySDK.refreshFirewall | ( | ) |
Get configuration of the firewall Triggers OnFirewallSettings.
final void com.speedify.speedifysdk.SpeedifySDK.refreshHistoricConnectionStats | ( | ) |
final void com.speedify.speedifysdk.SpeedifySDK.refreshLastDisconnectEvent | ( | ) |
Get the last session disconnect event Triggers OnLastDisconnectEvent.
final void com.speedify.speedifysdk.SpeedifySDK.refreshLocalProxy | ( | ) |
Get configuration of the local proxy Triggers OnLocalProxySettings.
final void com.speedify.speedifysdk.SpeedifySDK.refreshLocalVendorSettings | ( | ) |
Gets the local vendor settings Triggers OnLocalVendorSettings.
final void com.speedify.speedifysdk.SpeedifySDK.refreshLogSettings | ( | ) |
Get the current log settings Triggers OnLogSettings.
final void com.speedify.speedifysdk.SpeedifySDK.refreshNetworks | ( | ) |
final void com.speedify.speedifysdk.SpeedifySDK.refreshNetworkSharesAvailable | ( | ) |
Gets the discovered network shares Triggers OnNetworkSharesAvailable.
final void com.speedify.speedifysdk.SpeedifySDK.refreshNetworkSharingDiscovery | ( | ) |
final void com.speedify.speedifysdk.SpeedifySDK.refreshNetworkSharingSettings | ( | ) |
Gets the current network sharing settings Triggers OnNetworkSharingSettings.
final void com.speedify.speedifysdk.SpeedifySDK.refreshNonVPNApplications | ( | ) |
Refreshes list of applications that should not go over the VPN.
Triggers OnNonVPNApplications.
final void com.speedify.speedifysdk.SpeedifySDK.refreshOAuthToken | ( | String | newOAuthAccessToken | ) |
Refreshes the current oauth access token.
The application is responsible for fetching updated access tokens if using this method. If not logged in or logged in not using oauth, this will initiate a new login. Otherwise, the new token is stored to be used for future requests. Calling this from a logged in state presumes this is a token for the same user. If setting a custom directory, call setDirectoryDomain before calling this. Login errors will be signalled in OnLoginError. An expired access token will give an error of type TOKEN_EXPIRED, while invalid tokens will give CREDENTIAL.
newOAuthAccessToken | New access token for the user you wish to authenticate |
final void com.speedify.speedifysdk.SpeedifySDK.refreshPrivacy | ( | ) |
final void com.speedify.speedifysdk.SpeedifySDK.refreshRemoteVendorSettings | ( | ) |
Gets the remote vendor settings Triggers OnRemoteVendorSettings.
final void com.speedify.speedifysdk.SpeedifySDK.refreshSessionStats | ( | ) |
final void com.speedify.speedifysdk.SpeedifySDK.refreshSettings | ( | ) |
final void com.speedify.speedifysdk.SpeedifySDK.refreshSpeedTestResults | ( | ) |
Gets last 5 speed test results Triggers OnSpeedTestResults.
final void com.speedify.speedifysdk.SpeedifySDK.refreshState | ( | ) |
Refresh the current connection state and connected/last server.
Triggers OnState, OnConnectedServer.
final void com.speedify.speedifysdk.SpeedifySDK.refreshStreamingSettings | ( | ) |
final void com.speedify.speedifysdk.SpeedifySDK.refreshStreamingStats | ( | ) |
final void com.speedify.speedifysdk.SpeedifySDK.refreshVendorUserData | ( | ) |
Gets the vendor user data Triggers OnVendorUserData.
final void com.speedify.speedifysdk.SpeedifySDK.registerSdkStateReceiver | ( | @NonNull ISdkStateReceiver | handler | ) |
Register a receiver for SpeedifySDK state changes.
The receiver is stored as a WeakReference.
handler | the receiver to register |
final void com.speedify.speedifysdk.SpeedifySDK.registerWsMessageHandler | ( | IWsHandler | handler | ) |
final void com.speedify.speedifysdk.SpeedifySDK.requestNetworkSharingPair | ( | NetworkSharing.PeerUuid | peerUuid | ) |
Initiate a pair request with the specified peer.
peerUuid | The UUID of the device to pair with. Triggers OnNetworkSharesAvailable. |
final void com.speedify.speedifysdk.SpeedifySDK.resetAdapterUsage | ( | @NonNull String | adapterID | ) |
Resets the tracked data usage on an adapter.
adapterID | ID of the adapterID |
final void com.speedify.speedifysdk.SpeedifySDK.resetConnectionRateLimit | ( | @NonNull String | adapterID | ) |
Reset the speed rate limit on a connection to unlimited.
Current rateLimit available on AdapterData objects returned from OnAdaptersList.
adapterID | guid of adapter, from adapter list. |
final void com.speedify.speedifysdk.SpeedifySDK.resetDirectoryDomain | ( | ) |
Reset the directory server to defaults.
Triggers OnDirectorySettings, and (if logged in) OnDirectory on domain change.
final void com.speedify.speedifysdk.SpeedifySDK.resetDirectoryGatewayURI | ( | ) |
final void com.speedify.speedifysdk.SpeedifySDK.resetLocalProxyDomainWatchlist | ( | ) |
Resets the local proxy domain watchlist entries to their default settings Triggers OnLocalProxySettings.
final void com.speedify.speedifysdk.SpeedifySDK.restartServices | ( | ) |
Ensures relevant services are started.
final void com.speedify.speedifysdk.SpeedifySDK.sendFeedback | ( | String | feedback | ) |
Generates new ulp data report with feedback message attached.
feedback | feedback message |
final void com.speedify.speedifysdk.SpeedifySDK.sendLogReport | ( | String | email, |
String | message, | ||
File | file | ||
) |
Sends a log report to the Speedify team.
email address of the user sending the report | |
message | message to include with the report |
file | file to include with the report |
final void com.speedify.speedifysdk.SpeedifySDK.sendMessage | ( | String | messageType, |
JSONObject | data | ||
) |
final void com.speedify.speedifysdk.SpeedifySDK.sendMessage | ( | String | messageType, |
JSONArray | data | ||
) |
final void com.speedify.speedifysdk.SpeedifySDK.sendMessage | ( | String | messageType | ) |
final void com.speedify.speedifysdk.SpeedifySDK.setAdapterDailyDataLimit | ( | @NonNull String | adapterID, |
long | allowedBytes | ||
) |
Set the data usage, in bytes, allowed on this adapter in a single day.
Setting allowedBytes to 0 will disable this limit. Current value available on AdapterData objects returned from OnAdaptersList.
adapterID | ID of the adapterID |
allowedBytes | bytes that may be used in a single day. 0 for unlimited |
final void com.speedify.speedifysdk.SpeedifySDK.setAdapterMonthlyDataLimit | ( | @NonNull String | adapterID, |
long | allowedBytes, | ||
long | resetDay | ||
) |
Set the data usage, in bytes, allowed on this adapter in a single month.
Setting allowedBytes to 0 will disable this limit. Current value available on AdapterData objects returned from OnAdaptersList.
adapterID | ID of the adapterID |
allowedBytes | bytes that may be used in a single month. 0 for unlimited |
resetDay | day of the month that monthly usage is tracked from. 0 for last 30 days. unused if allowedBytes is 0 |
final void com.speedify.speedifysdk.SpeedifySDK.setAdapterOverlimitRatelimit | ( | @NonNull String | adapterID, |
long | bps | ||
) |
Sets how to handle an adapter that has hit its daily or monthly data limit.
Current value available on AdapterData objects returned from OnAdaptersList.
adapterID | ID of the adapterID |
bps | rate limit, in bits per second. 0 to not use the adapter. |
final void com.speedify.speedifysdk.SpeedifySDK.setAllowChaChaEncryption | ( | boolean | allowChaCha | ) |
Allow or disallow use of ChaCha for connection encryptions.
Current value available from OnSettings.
allowChaCha | allow use of ChaCha |
final void com.speedify.speedifysdk.SpeedifySDK.setAppName | ( | @NonNull String | name | ) |
Sets the app name used for autoaccounts and SDK-generated UI elements, such as the foreground notification.
This is automatically called from the constructor with the name
passed in. If calling this manually, do so before calling any login method.
name | new app name |
final void com.speedify.speedifysdk.SpeedifySDK.setConnectionEncryption | ( | @NonNull String | adapterID, |
boolean | encrypted | ||
) |
Change encryption settings per connection.
Current settings available from OnSettings.
adapterID | guid of adapter, from adapters list |
encrypted | whether to encrypt |
final void com.speedify.speedifysdk.SpeedifySDK.setConnectionPriorities | ( | @NonNull String | adapterID, |
ConnectionPriority | priority | ||
) |
Change priorities of a connection.
Current priority available on AdapterData objects returned from OnAdaptersList.
adapterID | guid of adapter, from adapters list. |
priority | priority level |
final void com.speedify.speedifysdk.SpeedifySDK.setConnectionRateLimit | ( | @NonNull String | adapterID, |
long | bps | ||
) |
Set the speed rate limit on a connection.
Current rateLimit available on AdapterData objects returned from OnAdaptersList.
adapterID | guid of adapter, from adapters list |
bps | rate limit, in bits per second |
final void com.speedify.speedifysdk.SpeedifySDK.setConnectionTransportMode | ( | TransportMode | transportMode | ) |
Sets the transport mode selection used for each connection.
Current value available from OnSettings.
transportMode | selection mode to use |
final void com.speedify.speedifysdk.SpeedifySDK.setConnectMethodAuto | ( | AutoConnectMethod | method | ) |
Set the default connection method to an automatic selection method.
Current settings available from OnServerSettings.
method | automatic server selection method to use |
final void com.speedify.speedifysdk.SpeedifySDK.setConnectMethodCity | ( | @NonNull String | country, |
@NonNull String | city | ||
) |
Set the default connection method to a specific city.
Current settings available from OnServerSettings.
country | 2-char ISO country code |
city | city name |
final void com.speedify.speedifysdk.SpeedifySDK.setConnectMethodCountry | ( | @NonNull String | country | ) |
Set the default connection method to a specific country.
Current settings available from OnServerSettings.
country | 2-char ISO country code |
final void com.speedify.speedifysdk.SpeedifySDK.setConnectMethodServer | ( | @NonNull String | country, |
@NonNull String | city, | ||
int | num | ||
) |
Set the default connection method to a specific server.
Current settings available from OnServerSettings.
country | 2-char ISO country code |
city | city name |
num | server number |
final void com.speedify.speedifysdk.SpeedifySDK.setConnectMethodServerExact | ( | @NonNull String | country, |
@NonNull String | city, | ||
int | num | ||
) |
Set the default connection method to a specific server, without fallback.
Current settings available from OnServerSettings.
country | 2-char ISO country code |
city | city name |
num | server number |
final void com.speedify.speedifysdk.SpeedifySDK.setDaemonLogSettings | ( | @NonNull DaemonLogSettings | daemon | ) |
Set daemon log file settings Triggers OnLogSettings.
Requires daemon restart to take effect.
daemon | daemon log settings |
final void com.speedify.speedifysdk.SpeedifySDK.setDirectoryDomain | ( | @NonNull String | domain | ) |
Change directory server used for user authentication and server management.
If using your own directory server, this must be called before login or loginAutoAccount. Triggers OnDirectorySettings, and (if logged in) OnDirectory on domain change.
domain | directory server domain, ie: directory.company.com |
final void com.speedify.speedifysdk.SpeedifySDK.setDirectoryGatewayURI | ( | @NonNull String | gatewayUri | ) |
Set an oauth gateway to use for directory server requests.
If using your own directory gateway, this must be called before loginOAuth. Triggers OnDirectorySettings, and (if logged in) OnDirectory on domain change.
gatewayUri | directory gateway uri, ie: https://directory.company.com/my/path/ |
final void com.speedify.speedifysdk.SpeedifySDK.setDisconnectOnExit | ( | boolean | shouldDisconnect | ) |
Sets the behavior of the VPN service upon task swipe/close all.
If true (default), the VPN will disconnect and its services will exit. Current value available from OnSettings.
shouldDisconnect | if the vpn service should disconnect and exit |
final void com.speedify.speedifysdk.SpeedifySDK.setDNSServers | ( | @NonNull List< String > | dnsAddrs | ) |
Set IP addresses of the DNS servers to use Current value available from OnPrivacySettings.
dnsAddrs | ip addresses of the DNS server to use |
final void com.speedify.speedifysdk.SpeedifySDK.setDoNotStoreCredentials | ( | boolean | doNotStore | ) |
Sets if credentials will not be stored.
This includes passwords, OAuth tokens, and Safe Browsing init config. Triggers OnPrivacySettings. If true, automatic login and connect at boot will not work.
doNotStore | If credentials will not be stored |
final void com.speedify.speedifysdk.SpeedifySDK.setDownstreamSubnets | ( | @NonNull List< Subnet > | subnets | ) |
Set the downstream subnets available on this device.
Current value available from OnSettings.
subnets | the downstream subnets available on this device |
final void com.speedify.speedifysdk.SpeedifySDK.setEnableDefaultRoute | ( | boolean | enable | ) |
Set whether the default route (0.0.0.0/0) goes over the VPN tunnel.
If connected, this triggers a reconnect. Current value available from OnSettings.
enable | if default route is added to the interface |
final void com.speedify.speedifysdk.SpeedifySDK.setESNIEnabled | ( | boolean | enableEsni | ) |
Sets if ESNI is used when talking to the directory domain If using your own directory server, this must be called before login or loginAutoAccount.
Triggers OnDirectorySettings, and (if logged in) OnDirectory on domain change.
enableEsni | is ESNI is used to talk to the directory |
final void com.speedify.speedifysdk.SpeedifySDK.setExcludeDefaultPrivateIPRanges | ( | boolean | exclude | ) |
Set whether the default private IP ranges are excluded from going over the VPN tunnel.
This range includes: 224.0.0.0/4, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 Current value available from OnSettings.
exclude | if default private IP ranges are excluded |
final void com.speedify.speedifysdk.SpeedifySDK.setExcludedIPRanges | ( | @NonNull List< IPRange > | excludedRanges | ) |
Set IP address ranges to exclude from going over the VPN tunnel.
If connected, this triggers a reconnect. This only has effect if enableDefaultRoute is true. Current value available from OnSettings. The following ranges are automatically excluded: 224.0.0.0/4, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
excludedRanges | ip ranges to exclude from the tunnel |
final void com.speedify.speedifysdk.SpeedifySDK.setFirewallDomains | ( | @NonNull List< String > | domains | ) |
Set domains to firewall.
domains | domain names to deny/allow Triggers OnFirewallSettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setFirewallIPv4 | ( | @NonNull List< String > | ipv4 | ) |
Set IPv4 address to firewall.
ipv4 | ipv4 addresses to deny/allow Triggers OnFirewallSettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setFirewallIPv6 | ( | @NonNull List< String > | ipv6 | ) |
Set IPv6 address to firewall.
ipv6 | ipv6 addresses to deny/allow Triggers OnFirewallSettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setFirewallMode | ( | FirewallMode | mode | ) |
Set the mode used by the firewall.
mode | how matches are treated Triggers OnFirewallSettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setFirewallPorts | ( | @NonNull List< FirewallPort > | ports | ) |
final void com.speedify.speedifysdk.SpeedifySDK.setForwardPorts | ( | @NonNull List< ForwardedPort > | ports | ) |
Set ports to be forwarded to this client when connected to a dedicated server.
Current value available from OnSettings.
ports | ports to be forwarded |
final void com.speedify.speedifysdk.SpeedifySDK.setHandler | ( | @Nullable ISpeedifyHandler | newHandler | ) |
Sets the main handler for event callbacks.
newHandler | event callback handler |
final void com.speedify.speedifysdk.SpeedifySDK.setHeaderCompression | ( | boolean | enable | ) |
Sets whether to allow header compression of packets over the VPN tunnel.
Current value available from OnSettings.
enable | allow header compression |
final void com.speedify.speedifysdk.SpeedifySDK.setIPLeakProtection | ( | boolean | enabled | ) |
Sets if IP Leak protection is enabled.
When disabled, allows other apps to bind their sockets around the VPN tunnel, directly on other network adapters. This also allows apps to receive multicast. Current value available from OnPrivacySettings.
enabled | If IP leak protection is enabled |
final void com.speedify.speedifysdk.SpeedifySDK.setJumboPackets | ( | boolean | useJumbo | ) |
Sets whether to allow jumbo packets over the VPN tunnel.
Current value available from OnSettings.
useJumbo | allow jumbo packets |
final void com.speedify.speedifysdk.SpeedifySDK.setKillswitch | ( | boolean | enabled | ) |
Sets if Internet Killswitch should be enabled.
When enabled, Internet connectivity is disabled if Speedify is not connected. Triggers OnPrivacySettings.
enabled | If killswitch is enabled |
final void com.speedify.speedifysdk.SpeedifySDK.setLanguage | ( | @NonNull String | language | ) |
Set the language used for error messages Triggers OnSettings.
Supported languages include 'en', 'ar, 'de', 'es', 'fr', 'pt', 'ro', 'ru', 'tr', 'zh', 'ja', 'it', 'ko', 'pl', 'uk', 'sv', 'nb'.
language | 2-character ISO language code used for error messages, ie: 'en' |
final void com.speedify.speedifysdk.SpeedifySDK.setLocalProxyDomains | ( | @NonNull List< String > | domains | ) |
Set domains to proxy locally, instead of going through the VPN.
domains | domain names to redirect through the local proxy Triggers OnLocalProxySettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setLocalProxyDomainWatchlist | ( | @NonNull List< LocalProxyDomainWatchlistItem > | domainWatchlist | ) |
Set domain watchlist settings for the local proxy If connected, this triggers a reconnect.
Triggers OnLocalProxySettings.
domainWatchlist | domain watchlist items |
final void com.speedify.speedifysdk.SpeedifySDK.setLocalProxyDomainWatchlistEnable | ( | @NonNull String | title, |
boolean | enabled | ||
) |
Toggle a single domain watchlist item from being enabled over the local proxy.
title | watchlist item title |
enabled | if this watchlist item's domains should be included in the local proxy filter Triggers OnLocalProxySettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setLocalProxyEnabled | ( | boolean | enabled | ) |
Enables or disables the local proxy.
enabled | enable the local proxy Triggers OnLocalProxySettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setLocalProxyGlobalDomainWatchlistEnable | ( | boolean | watchlistEnabled | ) |
Sets if settings in the local proxy domain watchlist entries are applied.
watchlistEnabled | if the domain watchlist is enabled Triggers OnLocalProxySettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setLocalProxyIPv4 | ( | @NonNull List< String > | ipv4 | ) |
Set IPv4 address to proxy locally, instead of going through the VPN.
ipv4 | ipv4 addresses to redirect through the local proxy Triggers OnLocalProxySettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setLocalProxyIPv6 | ( | @NonNull List< String > | ipv6 | ) |
Set IPv6 address to proxy locally, instead of going through the VPN.
ipv6 | ipv6 addresses to redirect through the local proxy Triggers OnLocalProxySettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setLocalProxyMatchMode | ( | ProxyMatchMode | matchMode | ) |
Set the match mode used by the local proxy.
matchMode | how matches are treated Triggers OnLocalProxySettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setLocalProxyPackages | ( | @NonNull List< String > | packages | ) |
Set packages route around the vpn, instead of going through the VPN.
If connected, this triggers a reconnect. Note that packages are routed around the VPN at the OS level, wherever other proxy options are routed through Speedify's internal local proxy. If the local proxy match mode is DENYLIST, then these package are the only packages allowed through the VPN.
packages | package names to redirect around the VPN. Triggers OnLocalProxySettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setLocalProxyPorts | ( | @NonNull List< LocalProxyPort > | ports | ) |
final void com.speedify.speedifysdk.SpeedifySDK.setLocalVendorSettings | ( | @NonNull JSONObject | settings, |
boolean | merge | ||
) |
Set local vendor settings Current value available from OnLocalVendorSettings.
settings | a json object |
merge | if true, settingsJson is merged in to existing local vendor settings. if false, settingsJson replaces existing local vendor settings |
final void com.speedify.speedifysdk.SpeedifySDK.setMaximumConnectRetry | ( | int | timeout | ) |
Speedify follows a backoff pattern for repeated errors when logging in or connecting to VPN servers.
With each subsequent failure, the wait time increases before attempting to login or connect again. The backoff's timeout limit can be set with this call.
timeout | Timeout in seconds |
final void com.speedify.speedifysdk.SpeedifySDK.setMaximumTransportRetry | ( | int | timeout | ) |
When Speedify fails to establish VPN transport connections over an Internet connection, it will use a backoff pattern to wait before attempting to establish a transport over that connection again.
This call is used to set that backoff timeout limit.
timeout | Timeout in seconds |
final void com.speedify.speedifysdk.SpeedifySDK.setMode | ( | BondingMode | mode | ) |
Change the basic mode of operation, between optimizing for speed or maximizing reliability.
Current value available from OnSettings.
mode | desired mode |
final void com.speedify.speedifysdk.SpeedifySDK.setNetworkSharingAutoPairBehavior | ( | NetworkSharing.AutoPairBehavior | behavior | ) |
Sets if and how devices are automatically paired when discovered.
behavior | behavior when discovering a peer Triggers OnNetworkSharingSettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setNetworkSharingClientEnabled | ( | boolean | enabled | ) |
Sets whether network sharing client will be active.
enabled | allow network sharing client Triggers OnNetworkSharingSettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setNetworkSharingDisplayName | ( | String | displayName | ) |
Sets the display name of this device.
displayName | displayName Triggers OnNetworkSharingSettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setNetworkSharingHostEnabled | ( | boolean | enabled | ) |
Sets whether network sharing host will be active.
enabled | allow network sharing host Triggers OnNetworkSharingSettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setNetworkSharingPairRequestBehavior | ( | NetworkSharing.PairRequestBehavior | behavior | ) |
Sets the behavior of pair requests from peers.
behavior | how peer pair requests should be handled Triggers OnNetworkSharingSettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setNetworkSharingPeerAllowAsClient | ( | NetworkSharing.PeerUuid | peerUuid, |
boolean | allowed | ||
) |
Sets whether or not the peer at the given UUID may be treated as a client, i.e.
whether this device may share data with the client device at the given UUID.
peerUuid | The UUID of the device to set the peer-client setting for. |
allowed | Whether to enable or disable the peer-client capability. Triggers OnNetworkSharesAvailable. |
final void com.speedify.speedifysdk.SpeedifySDK.setNetworkSharingPeerAllowAsHost | ( | NetworkSharing.PeerUuid | peerUuid, |
boolean | allowed | ||
) |
Sets whether or not the peer at the given UUID may be treated as a host, i.e.
whether this device may receive data from the host device at the given UUID.
peerUuid | The UUID of the device to set the peer-host setting for. |
allowed | Whether to enable or disable the peer-host capability. Triggers OnNetworkSharesAvailable. |
final void com.speedify.speedifysdk.SpeedifySDK.setNetworkSharingPeerAutoReconnect | ( | NetworkSharing.PeerUuid | peerUuid, |
boolean | allowed | ||
) |
Sets whether this device should automatically reconnect on discovery to a known network share.
peerUuid | The UUID of the device to set the auto-reconnect setting for. |
allowed | Whether to enable or disable auto-reconnect. Triggers OnNetworkSharesAvailable. |
final void com.speedify.speedifysdk.SpeedifySDK.setNetworkSharingSameUserAutoPair | ( | boolean | allow | ) |
Sets if devices from the same user are automatically paired.
allow | whether to allow auto pairing Triggers OnNetworkSharingSettings. |
final void com.speedify.speedifysdk.SpeedifySDK.setNeverExitOnSwipe | ( | boolean | neverExitOnSwipe | ) |
Setting this disables all disconnect/exit on swipe logic.
Your app will be responsible for calling ForceExit to close the daemon and foreground notification when you want to exit.
neverExitOnSwipe | if all swipe logic should be ignored |
final void com.speedify.speedifysdk.SpeedifySDK.setNonVPNApplications | ( | @NonNull List< String > | nonVpnApps | ) |
Set applications that should not go over the VPN.
This change takes effect on the next VPN connect. Packages in this list are always routed around the VPN at the OS level, regardless of local proxy settings. Current value available from OnNonVPNApplications via refreshNonVPNApplications.
nonVpnApps | list of package ids |
final void com.speedify.speedifysdk.SpeedifySDK.setOverflowThreshold | ( | double | mbpsOverflow | ) |
Set the overflow threshold.
Current value available from OnSettings.
mbpsOverflow | overflow threshold, in megabits per second |
final void com.speedify.speedifysdk.SpeedifySDK.setPriorityOverflowThreshold | ( | double | mbpsOverflow | ) |
Set the priority overflow threshold, which is used when there is active priority traffic (i.e.
real-time streams). Current value available from OnSettings.
mbpsOverflow | priority overflow threshold, in megabits per second |
final void com.speedify.speedifysdk.SpeedifySDK.setReportingEncryptionKey | ( | @Nullable String | key128bit | ) |
Set reporting encryption key.
key128bit | A 16 byte ascii encoded, 32byte hex encoded, or base64 encoded string used to encrypt sensitive reports, or null to use default. |
final void com.speedify.speedifysdk.SpeedifySDK.setRequestToDisableDoH | ( | boolean | disableDoH | ) |
Requests that browsers do not use DNS over HTTPS.
DoH can interfere with domain-based local proxy, firewall, and streaming settings. Triggers OnPrivacySettings.
disableDoH | If DoH is requested to be disabled |
final void com.speedify.speedifysdk.SpeedifySDK.setStartupConnect | ( | boolean | enabled | ) |
Set if Speedify should autmatically connect when the daemon starts.
Register a StartupBroadcastReceiver to obtain on-boot functionality. Triggers OnSettings.
enabled | automatically connect |
final void com.speedify.speedifysdk.SpeedifySDK.setStreamingDomains | ( | @NonNull List< String > | domains | ) |
Set domains to be identified as streams.
Triggers OnStreamingSettings.
domains | domain names to be identified as streams |
final void com.speedify.speedifysdk.SpeedifySDK.setStreamingIPv4 | ( | @NonNull List< String > | ipv4 | ) |
Set IPv4 address to identified as streams.
Triggers OnStreamingSettings.
ipv4 | ipv4 addresses tobe identified as streams |
final void com.speedify.speedifysdk.SpeedifySDK.setStreamingIPv6 | ( | @NonNull List< String > | ipv6 | ) |
Set IPv6 address to identified as streams.
Triggers OnStreamingSettings.
ipv6 | ipv6 addresses to be identified as streams |
final void com.speedify.speedifysdk.SpeedifySDK.setStreamingPorts | ( | @NonNull List< StreamingPort > | ports | ) |
Set ports to identified as streams.
Triggers OnStreamingSettings.
ports | ports to be identified as streams |
final void com.speedify.speedifysdk.SpeedifySDK.setTunnelEncrypted | ( | boolean | encrypted | ) |
Sets encryption status on all connections forming the tunnels.
This is equivalent to calling setConnectionEncryption for all adapterIDs. Current value available from OnSettings.
encrypted | whether to encrypt |
final void com.speedify.speedifysdk.SpeedifySDK.setUlpReportIntervalSeconds | ( | long | interval | ) |
Sets the ULP reporting inverval in seconds.
interval | The interval in seconds. |
final void com.speedify.speedifysdk.SpeedifySDK.setVendorUserData | ( | @Nullable String | vendorUserData | ) |
Set vendor user data Current value available from OnVendorUserData.
vendorUserData | user data string |
final void com.speedify.speedifysdk.SpeedifySDK.startNetworkSharingDiscovery | ( | ) |
Manually start (or restart) a discovery session.
This lasts for 30 seconds. Triggers OnNetworkSharingDiscovery.
final void com.speedify.speedifysdk.SpeedifySDK.startSpeedTest | ( | ) |
Starts a new speed test Triggers OnSpeedTestResults.
final void com.speedify.speedifysdk.SpeedifySDK.startStreamTest | ( | ) |
Starts a new speed test Triggers OnSpeedTestResults.
|
static |
internal use
event | event to subscribe to |
final void com.speedify.speedifysdk.SpeedifySDK.unpairNetworkSharingPeer | ( | NetworkSharing.PeerUuid | peerUuid | ) |
Unpair from a device at the given UUID.
Reports the current settings. If the device at uuid
was a currently-connected peer, this call will also reports the now-unpaired peer's state change.
peerUuid | The UUID of the device to unpair from. Triggers OnNetworkSharesAvailable. |
final void com.speedify.speedifysdk.SpeedifySDK.unregisterSdkStateReceiver | ( | @NonNull ISdkStateReceiver | handler | ) |
Unregister a receiver for SpeedifySDK state changes.
handler | the receiver to register |
|
static |
|
static |
Enables ISdkStateReceiver callbacks for to be used from the sdk background process (:vpnservice).
Must be called prior to initializing the SpeedifySDK object.
final MultiReceiverManager<IForegroundServiceStateReceiver> com.speedify.speedifysdk.SpeedifySDK.foregroundServiceReceivers = new MultiReceiverManager<IForegroundServiceStateReceiver>() |
Registers a new foreground service event receiver.
Receivers are WeakReferenced, so you must keep a reference to the receiver.
receiver | the receiver to register |
final MultiReceiverManager<ISdkStateReceiver> com.speedify.speedifysdk.SpeedifySDK.sdkStateReceivers = new MultiReceiverManager<ISdkStateReceiver>() |
Registers a new SDK state receiver Receivers are WeakReferenced, so you must keep a reference to the receiver.
receiver | the receiver to register |