Speedify SDK for Android  9.2.1
Advanced Initialization

Conditional Setup

If you do not want Speedify SDK's notification to be always present when running your app, you can conditionally initialize the SpeedifySDK object in your Application's onCreate only in the background process. You can then initialize the SpeedifySDK in your application's main process whenever you want. If you do this, be careful that your use the same name and port number in the constructor, or your application's main process won't be able to communicate with Speedify SDK's background process.

YourApplication.java

@Override
public void onCreate() {
super.onCreate();
// ... other boilerplate initialization ...
if (SpeedifySDK.IsBackgroundProcess(this)) {
SpeedifySDK SDK = new SpeedifySDK(getApplicationContext(), "My App Title", 5678);
return;
}
// ... other initialization specific to your app ...
}

YourVPNControlActivity.java

private void initializeSpeedifySDK() {
SpeedifySDK SDK = new SpeedifySDK(getApplicationContext(), "My App Title", 5678);
}

SDK Cleanup

To close down the SDK entirely without exiting your application, call SpeedifySDK.ForceExit(context). To restart the SDK, you must either reconstruct a new SpeedifySDK object or call restartServices on your old SpeedifySDK object.