Speedify SDK for Android  10.1.0
On-Boot Resume and Killswitch

The Speedify SDK includes support for automatically reconnecting at boot and enabling the killswitch at boot.

To do this, obtain the RECEIVE_BOOT_COMPLETED permission and register a StartupBroadcastReceiver in your manifest.

AndroidManifest.xml

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
...
<receiver
android:name="com.speedify.speedifysdk.StartupBroadcastReceiver"
android:enabled="true"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.HOME"/>
</intent-filter>
</receiver>

Control of these settings is done by setStartupConnect and setKillswitch.

If you initialize the Speedify SDK in your main process via your Application's onCreate or via resources as in Initializing the SDK, then there is nothing else to do.

If you followed Advanced Initialization and do not initialize the Speedify SDK in your main process's Application onCreate, then you must subclass StartupBroadcastReceiver and override the getSDK method. Remember to register this subclass in your manifest instead of the base StartupBroadcastReceiver.

AndroidManifest.xml

<receiver
android:name="com.package.MyStartupReceiver"
android:enabled="true"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.HOME"/>
</intent-filter>
</receiver>

MyStartupReceiver.java

package com.package;
import android.content.Context;
public class MyStartupReceiver extends StartupBroadcastReceiver {
@Override
protected SpeedifySDK getSDK(Context context) {
return myNewSpeedifySdkInstance;
}
}