![]() |
Speedify SDK for Android 15.5.0
|
Main SDK API. More...
Classes | |
interface | AutoConstruct |
Interface for your Application class to provided automatic construction of the SpeedifySDK when needed. More... | |
class | StatsRunnable |
Public Member Functions | |
Context | getApplicationContext () |
Gets the application context used to create the SpeedifySDK object. | |
SpeedifySDK (@NonNull Context applicationContext, @NonNull String name) | |
Constructor for SpeedifySDK with default handler. | |
SpeedifySDK (@NonNull Context applicationContext, @NonNull String name, @NonNull ISpeedifyHandler handler) | |
Constructor for SpeedifySDK with provided handler. | |
final void | setAppName (@NonNull String name) |
Sets the app name used for autoaccounts and SDK-generated UI elements, such as the foreground notification. | |
final void | setHandler (@Nullable ISpeedifyHandler newHandler) |
Sets the main handler for event callbacks. | |
final void | restartServices () |
Ensures relevant services are started. | |
final void | connectAuto (AutoConnectMethod method) |
Connect to a server by an automatic selection method. | |
final void | connectProxy () |
Runs the Speedify VPN as a local proxy, without a connection to a remote server. | |
final void | connectByCountry (@NonNull String country) |
Connect to a server by server country. | |
final void | connectByCity (@NonNull String country, @NonNull String city) |
Connect to a server by server city. | |
final void | connectByServer (@NonNull String country, @NonNull String city, int num) |
Connect to a specific server. | |
final void | connectByServerExact (@NonNull String country, @NonNull String city, int num) |
Connect to a specific server, without fallback. | |
final void | setConnectMethodAuto (AutoConnectMethod method) |
Set the default connection method to an automatic selection method. | |
final void | setConnectMethodCountry (@NonNull String country) |
Set the default connection method to a specific country. | |
final void | setConnectMethodCity (@NonNull String country, @NonNull String city) |
Set the default connection method to a specific city. | |
final void | setConnectMethodServer (@NonNull String country, @NonNull String city, int num) |
Set the default connection method to a specific server. | |
final void | setConnectMethodServerExact (@NonNull String country, @NonNull String city, int num) |
Set the default connection method to a specific server, without fallback. | |
final void | disconnect () |
Disconnect from the server if connected, or cancel a connection attempt if currenty connecting. | |
final void | login (@NonNull String username, @NonNull String password) |
Authenticate a new user. | |
final void | loginOAuth (@NonNull String oauthAccessToken) |
Authenticate a new user using an oauth access token. | |
final void | refreshOAuthToken (String newOAuthAccessToken) |
Refreshes the current oauth access token. | |
final void | getActivationCode () |
Gets an activation code usable to login via the website. | |
final void | logout () |
Logout the current user. | |
final void | setMode (BondingMode mode) |
Change the basic mode of operation, between optimizing for speed or maximizing reliability. | |
final void | setConnectionPriorities (@NonNull String adapterID, ConnectionPriority priority) |
Change priorities of a connection. | |
final void | enableAutomaticConnectionPriority (boolean enabled) |
Set if automatic priority is allowed. | |
final void | setConnectionEncryption (@NonNull String adapterID, boolean encrypted) |
Change encryption settings per connection. | |
final void | setTunnelEncrypted (boolean encrypted) |
Sets encryption status on all connections forming the tunnels. | |
final void | setConnectionRateLimit (@NonNull String adapterID, long bps) |
Set the download and upload speed rate limit on a connection. | |
final void | setConnectionRateLimit (@NonNull String adapterID, long downBps, long upBps) |
Set the download and upload speed rate limit on a connection. | |
final void | resetConnectionRateLimit (@NonNull String adapterID) |
Reset the speed rate limit on a connection to unlimited. | |
final void | setOverflowThreshold (double mbpsOverflow) |
Set the overflow threshold. | |
final void | setPriorityOverflowThreshold (double mbpsOverflow) |
Set the priority overflow threshold, which is used when there is active priority traffic (i.e. | |
final void | setDirectoryDomain (@NonNull String domain) |
Change directory server used for user authentication and server management. | |
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 . | |
final void | resetDirectoryDomain () |
Reset the directory server to defaults. | |
final void | setDirectoryGatewayURI (@NonNull String gatewayUri) |
Set an oauth gateway to use for directory server requests. | |
final void | resetDirectoryGatewayURI () |
Reset the directory oauth gateway to defaults. | |
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. | |
final void | refreshHistoricConnectionStats () |
Gets historic tunnel stats for last 5 minutes. | |
final void | refreshSessionStats () |
Refreshes session stats. | |
final void | refreshStreamingStats () |
Refreshes streaming stats. | |
final void | refreshDirectory () |
Refresh a list of available servers from the directory list. | |
final void | refreshDirectorySettings () |
Refresh the current directory settings. | |
final void | refreshState () |
Refresh the current connection state and connected/last server. | |
final void | refreshNetworks () |
Refresh the list of current connection. | |
final void | refreshSettings () |
Refresh the current settings information. | |
final void | refreshConnectedServer () |
Requests information about the current connected VPN server Triggers OnConnectedServer . | |
final void | refreshAll () |
Shortcut to refresh all data. | |
final void | handleNewAdapter (@NonNull String adapterID) |
Acknowledge and clear message about a new adapter. | |
final void | handleAdapterOverlimit (@NonNull String adapterID) |
Acknowledge and clear message about an overlimit adapter. | |
final void | addAdapterDailyDataLimitBoost (@NonNull String adapterID, long additionalBytes) |
Adds additional bytes to the adapter's daily data usage limit for today. | |
final void | setAdapterDailyDataLimit (@NonNull String adapterID, long allowedBytes) |
Set the data usage, in bytes, allowed on this adapter in a single day. | |
final void | disableAdapterDailyDataLimit (@NonNull String adapterID) |
Sets the adapter to unlimited daily data usage. | |
final void | setAdapterMonthlyDataLimit (@NonNull String adapterID, long allowedBytes, long resetDay) |
Set the data usage, in bytes, allowed on this adapter in a single month. | |
final void | disableAdapterMonthlyDataLimit (@NonNull String adapterID) |
Sets the adapter to unlimited daily data usage. | |
final void | setExcludedIPRanges (@NonNull List< IPRange > excludedRanges) |
Set IP address ranges to exclude from going over the VPN tunnel. | |
final void | setExcludeDefaultPrivateIPRanges (boolean exclude) |
Set whether the default private IP ranges are excluded from going over the VPN tunnel. | |
final void | setIPLeakProtection (boolean enabled) |
Sets if IP Leak protection is enabled. | |
final void | setEnableDefaultRoute (boolean enable) |
Set whether the default route (0.0.0.0/0) goes over the VPN tunnel. | |
final void | setJumboPackets (boolean useJumbo) |
Sets whether to allow jumbo packets over the VPN tunnel. | |
final void | setConnectionTransportMode (TransportMode transportMode) |
Sets the transport mode selection used for each connection. | |
final void | setAllowChaChaEncryption (boolean allowChaCha) |
Allow or disallow use of ChaCha for connection encryptions. | |
final void | setAdapterOverlimitRatelimit (@NonNull String adapterID, long bps) |
Sets how to handle an adapter that has hit its daily or monthly data limit. | |
final void | resetAdapterUsage (@NonNull String adapterID) |
Resets the tracked data usage on an adapter. | |
final void | loginAutoAccount () |
Logs out of any current account and logs in to an automatically generated account for this device. | |
final void | loginLocalLoopbackOnly () |
Comcast Loopback Function. | |
final void | accountCheck (@NonNull String email) |
Check if there is already an account using this email address. | |
final void | accountCreate (@NonNull String email, @NonNull String password) |
Create a new account using this email address. | |
final void | accountPasswordChange (@NonNull String email, @NonNull String originalPassword, @NonNull String newPassword) |
Change the password on the account. | |
final void | refreshNonVPNApplications () |
Refreshes list of applications that should not go over the VPN. | |
final void | setNonVPNApplications (@NonNull List< String > nonVpnApps) |
Set applications that should not go over the VPN. | |
final void | refreshAccounting () |
Refresh account data. | |
final void | refreshPrivacy () |
Refresh privacy settings. | |
final void | setDoNotStoreCredentials (boolean doNotStore) |
Sets if credentials will not be stored. | |
final void | setReportingEncryptionKey (@Nullable String key128bit) |
Set reporting encryption key. | |
final void | setDisconnectOnExit (boolean shouldDisconnect) |
Sets the behavior of the VPN service upon task swipe/close all. | |
final void | setNeverExitOnSwipe (boolean neverExitOnSwipe) |
Setting this disables all disconnect/exit on swipe logic. | |
final void | setDNSServers (@NonNull List< String > dnsAddrs) |
Set IP addresses of the DNS servers to use Current value available from OnPrivacySettings . | |
final void | setForwardPorts (@NonNull List< ForwardedPort > ports) |
Set ports to be forwarded to this client when connected to a dedicated server. | |
final void | setDownstreamSubnets (@NonNull List< Subnet > subnets) |
Set the downstream subnets available on this device. | |
final void | setLocalVendorSettings (@NonNull JSONObject settings, boolean merge) |
Set local vendor settings Current value available from OnLocalVendorSettings . | |
final void | refreshLocalVendorSettings () |
Gets the local vendor settings Triggers OnLocalVendorSettings . | |
final void | refreshRemoteVendorSettings () |
Gets the remote vendor settings Triggers OnRemoteVendorSettings . | |
final void | setVendorUserData (@Nullable String vendorUserData) |
Set vendor user data Current value available from OnVendorUserData . | |
final void | refreshVendorUserData () |
Gets the vendor user data Triggers OnVendorUserData . | |
final void | refreshLocalProxy () |
Get configuration of the local proxy Triggers OnLocalProxySettings . | |
final void | setLocalProxyEnabled (boolean enabled) |
Enables or disables the local proxy. | |
final void | setLocalProxyMatchMode (ProxyMatchMode matchMode) |
Set the match mode used by the local proxy. | |
final void | setLocalProxyDomains (@NonNull List< String > domains) |
Set domains to proxy locally, instead of going through the VPN. | |
final void | setLocalProxyPackages (@NonNull List< String > packages) |
Set packages route around the vpn, instead of going through the VPN. | |
final void | setLocalProxyIPv4 (@NonNull List< String > ipv4) |
Set IPv4 address to proxy locally, instead of going through the VPN. | |
final void | setLocalProxyIPv6 (@NonNull List< String > ipv6) |
Set IPv6 address to proxy locally, instead of going through the VPN. | |
final void | setLocalProxyPorts (@NonNull List< LocalProxyPort > ports) |
Set ports to proxy. | |
final void | setLocalProxyDomainWatchlist (@NonNull List< LocalProxyDomainWatchlistItem > domainWatchlist) |
Set domain watchlist settings for the local proxy If connected, this triggers a reconnect. | |
final void | setLocalProxyDomainWatchlistEnable (@NonNull String title, boolean enabled) |
Toggle a single domain watchlist item from being enabled over the local proxy. | |
final void | setLocalProxyGlobalDomainWatchlistEnable (boolean watchlistEnabled) |
Sets if settings in the local proxy domain watchlist entries are applied. | |
final void | resetLocalProxyDomainWatchlist () |
Resets the local proxy domain watchlist entries to their default settings Triggers OnLocalProxySettings . | |
final void | refreshCaptivePortals () |
Checks connected networks for captive portals Triggers OnCaptivePortals . | |
final void | enableCaptivePortalMode (@NonNull String adapterID) |
Enable captive portal mode, sending all traffic over the specified network. | |
final void | disableCaptivePortalMode () |
Disable captive portal mode. | |
final void | refreshFirewall () |
Get configuration of the firewall Triggers OnFirewallSettings . | |
final void | setFirewallMode (FirewallMode mode) |
Set the mode used by the firewall. | |
final void | setFirewallDomains (@NonNull List< String > domains) |
Set domains to firewall. | |
final void | setFirewallIPv4 (@NonNull List< String > ipv4) |
Set IPv4 address to firewall. | |
final void | setFirewallIPv6 (@NonNull List< String > ipv6) |
Set IPv6 address to firewall. | |
final void | setFirewallPorts (@NonNull List< FirewallPort > ports) |
Set ports to firewall. | |
final void | refreshStreamingSettings () |
Get configuration of streaming settings. | |
final void | setStreamingDomains (@NonNull List< String > domains) |
Set domains to be identified as streams. | |
final void | setStreamingIPv4 (@NonNull List< String > ipv4) |
Set IPv4 address to identified as streams. | |
final void | setStreamingIPv6 (@NonNull List< String > ipv6) |
Set IPv6 address to identified as streams. | |
final void | setStreamingPorts (@NonNull List< StreamingPort > ports) |
Set ports to identified as streams. | |
final void | setKillswitch (boolean enabled) |
Sets if Internet Killswitch should be enabled. | |
final void | setRequestToDisableDoH (boolean disableDoH) |
Requests that browsers do not use DNS over HTTPS. | |
final void | setStartupConnect (boolean enabled) |
Set if Speedify should autmatically connect when the daemon starts. | |
final void | refreshLastDisconnectEvent () |
Get the last session disconnect event Triggers OnLastDisconnectEvent . | |
final void | refreshLogSettings () |
Get the current log settings Triggers OnLogSettings . | |
final void | setDaemonLogSettings (@NonNull DaemonLogSettings daemon) |
Set daemon log file settings Triggers OnLogSettings . | |
final void | eraseAllLogFiles () |
Erase all log files and log zips. | |
final void | setHeaderCompression (boolean enable) |
Sets whether to allow header compression of packets over the VPN tunnel. | |
final boolean | hasVPNPermission () |
Checks if the SDK currently has VPN permission. | |
final void | initializeVPNPermission () |
Requests VPN permission from the user through the system VPN dialog Triggers OnVPNPermissionResult . | |
final void | setLanguage (@NonNull String language) |
Set the language used for error messages Triggers OnSettings . | |
final void | startSpeedTest () |
Starts a new speed test Triggers OnSpeedTestResults . | |
final void | startStreamTest () |
Starts a new speed test Triggers OnSpeedTestResults . | |
final void | refreshSpeedTestResults () |
Gets last 5 speed test results Triggers OnSpeedTestResults . | |
final void | refreshNetworkSharingSettings () |
Gets the current network sharing settings Triggers OnNetworkSharingSettings . | |
final void | setNetworkSharingClientEnabled (boolean enabled) |
Sets whether network sharing client will be active. | |
final void | setNetworkSharingHostEnabled (boolean enabled) |
Sets whether network sharing host will be active. | |
final void | setNetworkSharingDisplayName (String displayName) |
Sets the display name of this device. | |
final void | connectToNetworkShareViaConnectCode (NetworkSharing.ConnectCode connectCode) |
Connects to a network share manually via a connect code. | |
final void | reconnectToNetworkShare (NetworkSharing.PeerUuid peerUuid) |
Reconnects to a previously authenticated network share. | |
final void | startNetworkSharingDiscovery () |
Manually start (or restart) a discovery session. | |
final void | refreshNetworkSharingDiscovery () |
Get the state of network sharing discovery. | |
final void | refreshNetworkSharesAvailable () |
Gets the discovered network shares Triggers OnNetworkSharesAvailable . | |
final void | setNetworkSharingPeerAutoReconnect (NetworkSharing.PeerUuid peerUuid, boolean allowed) |
Sets whether this device should automatically reconnect on discovery to a known network share. | |
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. | |
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. | |
final void | unpairNetworkSharingPeer (NetworkSharing.PeerUuid peerUuid) |
Unpair from a device at the given UUID. | |
final void | requestNetworkSharingPair (NetworkSharing.PeerUuid peerUuid) |
Initiate a pair request with the specified peer. | |
final void | allowNetworkSharingPair (NetworkSharing.PeerUuid peerUuid, boolean allowed) |
Allow or deny a pair request from the specified peer. | |
final void | setNetworkSharingPairRequestBehavior (NetworkSharing.PairRequestBehavior behavior) |
Sets the behavior of pair requests from peers. | |
final void | setNetworkSharingSameUserAutoPair (boolean allow) |
Sets if devices from the same user are automatically paired. | |
final void | setNetworkSharingAutoPairBehavior (NetworkSharing.AutoPairBehavior behavior) |
Sets if and how devices are automatically paired when discovered. | |
final void | setUlpReportIntervalSeconds (long interval) |
Sets the ULP reporting inverval in seconds. | |
final void | setMaximumConnectRetry (int timeout) |
Speedify follows a backoff pattern for repeated errors when logging in or connecting to VPN servers. | |
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. | |
final void | sendFeedback (String feedback) |
Generates new ulp data report with feedback message attached. | |
final void | sendLogReport (String email, String message, File file) |
Sends a log report to the Speedify team. | |
final boolean | isBackgroundProcess () |
Test if currently in sdk background process (:vpnservice). | |
void | destroy () |
Destroys this instance of the SpeedifySDK. | |
final void | registerSdkStateReceiver (@NonNull ISdkStateReceiver handler) |
Register a receiver for SpeedifySDK state changes. | |
final void | unregisterSdkStateReceiver (@NonNull ISdkStateReceiver handler) |
Unregister a receiver for SpeedifySDK state changes. | |
Static Public Member Functions | |
static SpeedifySDK | getInstance (@Nullable Context context) |
Gets the current SpeedifySDK instance. | |
static SpeedifySDK | getInstance () |
Gets the current SpeedifySDK instance. | |
static boolean | isSdkAlive () |
Check if there is an active instance of the Speedify SDK. | |
static final String | Version () |
SpeedifySDK version. | |
static boolean | hasVPNPermission (Context appContext) |
Checks if the SDK currently has VPN permission. | |
static void | initializeVPNPermission (Context appContext) |
Requests VPN permission from the user through the system VPN dialog Triggers OnVPNPermissionResult . | |
static void | subscribeToEvent (String event) |
internal use | |
static boolean | IsBackgroundProcess (@NonNull Application application) |
Test if currently in sdk background process (:vpnservice). | |
static boolean | IsBackgroundProcess (@NonNull Context context) |
Test if currently in sdk background process (:vpnservice). | |
static void | ForceExit (@NonNull Context context) |
Force Speedify SDK to exit and all SpeedifySDK objects to cleanup themselves. | |
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. | |
final MultiReceiverManager< IForegroundServiceStateReceiver > | foregroundServiceReceivers = new MultiReceiverManager<IForegroundServiceStateReceiver>() |
Registers a new foreground service event receiver. | |
Static Public Attributes | |
static boolean | EnableSDKHandlerFromBackground = false |
Enables ISdkStateReceiver callbacks for to be used from the sdk background process (:vpnservice). | |
Protected Member Functions | |
void | onMessage (String messageType, JSONArray data) |
internal use | |
void | onMessage (String messageType, JSONObject data) |
internal use | |
void | onMessage (String messageType) |
internal use | |
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.
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. |
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 accountCheck | ( | @NonNull String | ) |
Check if there is already an account using this email address.
Triggers OnAccountCheckResult
.
account to check for |
final void 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 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 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 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 connectAuto | ( | AutoConnectMethod | method | ) |
Connect to a server by an automatic selection method.
If already connected, this will disconnect before reconnecting. Unless called with BYSETTING
, which will not trigger a reconnect. 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 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 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 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 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 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 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 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 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 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 disableCaptivePortalMode | ( | ) |
Disable captive portal mode.
final void disconnect | ( | ) |
Disconnect from the server if connected, or cancel a connection attempt if currenty connecting.
final void enableAutomaticConnectionPriority | ( | boolean | enabled | ) |
Set if automatic priority is allowed.
Current settings available from OnSettings
.
enabled | if allowed |
final void 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 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 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 getActivationCode | ( | ) |
Gets an activation code usable to login via the website.
If setting a custom directory, call SpeedifySDK_SetDirectoryDomain() before calling this.
Context getApplicationContext | ( | ) |
Gets the application context used to create the SpeedifySDK object.
|
static |
|
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. |
final void handleAdapterOverlimit | ( | @NonNull String | adapterID | ) |
Acknowledge and clear message about an overlimit adapter.
adapterID | ID of the adapterID |
final void handleNewAdapter | ( | @NonNull String | adapterID | ) |
Acknowledge and clear message about a new adapter.
adapterID | ID of the adapterID |
final boolean hasVPNPermission | ( | ) |
Checks if the SDK currently has VPN permission.
|
static |
Checks if the SDK currently has VPN permission.
appContext | application context |
final void 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 |
|
static |
Test if currently in sdk background process (:vpnservice).
context | an android Context |
final boolean isBackgroundProcess | ( | ) |
Test if currently in sdk background process (:vpnservice).
|
static |
Check if there is an active instance of the Speedify SDK.
final void 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 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 loginLocalLoopbackOnly | ( | ) |
Comcast Loopback Function.
final void 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 logout | ( | ) |
|
protected |
internal use
messageType | the message identifier |
|
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 |
final void 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 refreshAccounting | ( | ) |
final void 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 refreshCaptivePortals | ( | ) |
Checks connected networks for captive portals Triggers OnCaptivePortals
.
final void refreshConnectedServer | ( | ) |
Requests information about the current connected VPN server Triggers OnConnectedServer
.
final void refreshDirectory | ( | ) |
final void refreshDirectorySettings | ( | ) |
final void refreshFirewall | ( | ) |
Get configuration of the firewall Triggers OnFirewallSettings
.
final void refreshHistoricConnectionStats | ( | ) |
final void refreshLastDisconnectEvent | ( | ) |
Get the last session disconnect event Triggers OnLastDisconnectEvent
.
final void refreshLocalProxy | ( | ) |
Get configuration of the local proxy Triggers OnLocalProxySettings
.
final void refreshLocalVendorSettings | ( | ) |
Gets the local vendor settings Triggers OnLocalVendorSettings
.
final void refreshLogSettings | ( | ) |
Get the current log settings Triggers OnLogSettings
.
final void refreshNetworks | ( | ) |
final void refreshNetworkSharesAvailable | ( | ) |
Gets the discovered network shares Triggers OnNetworkSharesAvailable
.
final void refreshNetworkSharingDiscovery | ( | ) |
final void refreshNetworkSharingSettings | ( | ) |
Gets the current network sharing settings Triggers OnNetworkSharingSettings
.
final void refreshNonVPNApplications | ( | ) |
Refreshes list of applications that should not go over the VPN.
Triggers OnNonVPNApplications
.
final void 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 refreshPrivacy | ( | ) |
final void refreshRemoteVendorSettings | ( | ) |
Gets the remote vendor settings Triggers OnRemoteVendorSettings
.
final void refreshSessionStats | ( | ) |
final void refreshSettings | ( | ) |
final void refreshSpeedTestResults | ( | ) |
Gets last 5 speed test results Triggers OnSpeedTestResults
.
final void refreshState | ( | ) |
Refresh the current connection state and connected/last server.
Triggers OnState
, OnConnectedServer
.
final void refreshStreamingSettings | ( | ) |
final void refreshStreamingStats | ( | ) |
final void refreshVendorUserData | ( | ) |
Gets the vendor user data Triggers OnVendorUserData
.
final void registerSdkStateReceiver | ( | @NonNull ISdkStateReceiver | handler | ) |
Register a receiver for SpeedifySDK state changes.
The receiver is stored as a WeakReference.
handler | the receiver to register |
sdkStateReceivers.register
instead final void 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 resetAdapterUsage | ( | @NonNull String | adapterID | ) |
Resets the tracked data usage on an adapter.
adapterID | ID of the adapterID |
final void 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 resetDirectoryDomain | ( | ) |
Reset the directory server to defaults.
Triggers OnDirectorySettings
, and (if logged in) OnDirectory
on domain change.
final void resetDirectoryGatewayURI | ( | ) |
final void resetLocalProxyDomainWatchlist | ( | ) |
Resets the local proxy domain watchlist entries to their default settings Triggers OnLocalProxySettings
.
final void restartServices | ( | ) |
Ensures relevant services are started.
final void sendFeedback | ( | String | feedback | ) |
Generates new ulp data report with feedback message attached.
feedback | feedback message |
final void 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 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 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 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 setAllowChaChaEncryption | ( | boolean | allowChaCha | ) |
Allow or disallow use of ChaCha for connection encryptions.
Current value available from OnSettings
.
allowChaCha | allow use of ChaCha |
final void 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 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 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 setConnectionRateLimit | ( | @NonNull String | adapterID, |
long | bps ) |
Set the download and upload 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 setConnectionRateLimit | ( | @NonNull String | adapterID, |
long | downBps, | ||
long | upBps ) |
Set the download and upload speed rate limit on a connection.
Current rateLimit available on AdapterData
objects returned from OnAdaptersList
.
adapterID | guid of adapter, from adapters list |
downBps | download rate limit, in bits per second |
upBps | upload rate limit, in bits per second |
final void setConnectionTransportMode | ( | TransportMode | transportMode | ) |
Sets the transport mode selection used for each connection.
Current value available from OnSettings
.
transportMode | selection mode to use |
final void 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 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 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 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 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 setDaemonLogSettings | ( | @NonNull DaemonLogSettings | daemon | ) |
Set daemon log file settings Triggers OnLogSettings
.
Requires daemon restart to take effect.
daemon | daemon log settings |
final void 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 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 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 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 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 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 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 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 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 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 setFirewallDomains | ( | @NonNull List< String > | domains | ) |
Set domains to firewall.
domains | domain names to deny/allow Triggers OnFirewallSettings . |
final void setFirewallIPv4 | ( | @NonNull List< String > | ipv4 | ) |
Set IPv4 address to firewall.
ipv4 | ipv4 addresses to deny/allow Triggers OnFirewallSettings . |
final void setFirewallIPv6 | ( | @NonNull List< String > | ipv6 | ) |
Set IPv6 address to firewall.
ipv6 | ipv6 addresses to deny/allow Triggers OnFirewallSettings . |
final void setFirewallMode | ( | FirewallMode | mode | ) |
Set the mode used by the firewall.
mode | how matches are treated Triggers OnFirewallSettings . |
final void setFirewallPorts | ( | @NonNull List< FirewallPort > | ports | ) |
final void 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 setHandler | ( | @Nullable ISpeedifyHandler | newHandler | ) |
Sets the main handler for event callbacks.
newHandler | event callback handler |
final void 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 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 setJumboPackets | ( | boolean | useJumbo | ) |
Sets whether to allow jumbo packets over the VPN tunnel.
Current value available from OnSettings
.
useJumbo | allow jumbo packets |
final void 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 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 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 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 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 setLocalProxyEnabled | ( | boolean | enabled | ) |
Enables or disables the local proxy.
enabled | enable the local proxy Triggers OnLocalProxySettings . |
final void 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 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 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 setLocalProxyMatchMode | ( | ProxyMatchMode | matchMode | ) |
Set the match mode used by the local proxy.
matchMode | how matches are treated Triggers OnLocalProxySettings . |
final void 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 setLocalProxyPorts | ( | @NonNull List< LocalProxyPort > | ports | ) |
final void 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 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 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 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 setNetworkSharingAutoPairBehavior | ( | NetworkSharing.AutoPairBehavior | behavior | ) |
Sets if and how devices are automatically paired when discovered.
behavior | behavior when discovering a peer Triggers OnNetworkSharingSettings . |
final void setNetworkSharingClientEnabled | ( | boolean | enabled | ) |
Sets whether network sharing client will be active.
enabled | allow network sharing client Triggers OnNetworkSharingSettings . |
final void setNetworkSharingDisplayName | ( | String | displayName | ) |
Sets the display name of this device.
displayName | displayName Triggers OnNetworkSharingSettings . |
final void setNetworkSharingHostEnabled | ( | boolean | enabled | ) |
Sets whether network sharing host will be active.
enabled | allow network sharing host Triggers OnNetworkSharingSettings . |
final void setNetworkSharingPairRequestBehavior | ( | NetworkSharing.PairRequestBehavior | behavior | ) |
Sets the behavior of pair requests from peers.
behavior | how peer pair requests should be handled Triggers OnNetworkSharingSettings . |
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.
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 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 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 setNetworkSharingSameUserAutoPair | ( | boolean | allow | ) |
Sets if devices from the same user are automatically paired.
allow | whether to allow auto pairing Triggers OnNetworkSharingSettings . |
setNetworkSharingAutoPairBehavior
final void 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 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 setOverflowThreshold | ( | double | mbpsOverflow | ) |
Set the overflow threshold.
Current value available from OnSettings
.
mbpsOverflow | overflow threshold, in megabits per second |
final void 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 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 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 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 setStreamingDomains | ( | @NonNull List< String > | domains | ) |
Set domains to be identified as streams.
Triggers OnStreamingSettings
.
domains | domain names to be identified as streams |
final void setStreamingIPv4 | ( | @NonNull List< String > | ipv4 | ) |
Set IPv4 address to identified as streams.
Triggers OnStreamingSettings
.
ipv4 | ipv4 addresses tobe identified as streams |
final void setStreamingIPv6 | ( | @NonNull List< String > | ipv6 | ) |
Set IPv6 address to identified as streams.
Triggers OnStreamingSettings
.
ipv6 | ipv6 addresses to be identified as streams |
final void setStreamingPorts | ( | @NonNull List< StreamingPort > | ports | ) |
Set ports to identified as streams.
Triggers OnStreamingSettings
.
ports | ports to be identified as streams |
final void 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 setUlpReportIntervalSeconds | ( | long | interval | ) |
Sets the ULP reporting inverval in seconds.
interval | The interval in seconds. |
final void setVendorUserData | ( | @Nullable String | vendorUserData | ) |
Set vendor user data Current value available from OnVendorUserData
.
vendorUserData | user data string |
final void startNetworkSharingDiscovery | ( | ) |
Manually start (or restart) a discovery session.
This lasts for 30 seconds. Triggers OnNetworkSharingDiscovery
.
final void startSpeedTest | ( | ) |
Starts a new speed test Triggers OnSpeedTestResults
.
final void startStreamTest | ( | ) |
Starts a new speed test Triggers OnSpeedTestResults
.
|
static |
internal use
event | event to subscribe to |
final void 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 unregisterSdkStateReceiver | ( | @NonNull ISdkStateReceiver | handler | ) |
Unregister a receiver for SpeedifySDK state changes.
handler | the receiver to register |
sdkStateReceivers.unregister
instead
|
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> 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> 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 |