Speedify SDK for Android  9.2.1
Initializing the SDK

Creating the SpeedifySDK object

The Speedify SDK needs to know the name of the application hosting it (for display purposes) and a unique port number to use to communicate between the foreground and background processes. These may be provided in several ways:

With either method, you may call SpeedifySDK.getInstance() to obtain a preexising SpeedifySDK object.

A note on processes

However you choose to initialize the SDK, Speedify will run a background process to host its daemon and VPN. In your Application's onCreate method, you should check for this with IsBackgroundProcess and return early to avoid running your own features in Speedify's background process.

@Override
public void onCreate() {
super.onCreate();
// ... other boilerplate initialization, potentially including your SpeedifySDK initialization code ...
if (SpeedifySDK.IsBackgroundProcess(this)) return;
// ... other initialization specific to your app ...
}

Handlers

If you do not use SpeedifySDK(Context,String,int,ISpeedifyHandler) to specify a custom ISpeedifyHandler, you can call setHandler on your SpeedifySDK object to set one later. Note that some callbacks on the ISpeedifyHandler happen in Speedify SDK's background process. If you want to implment these, you must also call setHandler from the background process. To check if the current process is the background process, use SpeedifySDK.IsBackgroundProcess(Application) (preferred) or SpeedifySDK.IsBackgroundProcess(Context).