Speedify SDK for Android  10.6.0
Tracking Disconnect Events

Most reasons for disconnect events are tracked automatically by the Speedify SDK, except for Reboot and Upgrade disconnects. These require getting messages from the OS on boot. To receive these, either add StartupBroadcastReceiver or StateTrackingSBR to your manifest, or call StateTrackingSBR.CheckStartupEvent() from your own BOOT_COMPLETED receiver.

Option A: Adding StartupBroadcastReceiver

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>

Option B: Adding StateTrackingSBR

AndroidManifest.xml

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
...
<receiver
android:name="com.speedify.speedifysdk.StateTrackingSBR"
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>

Option C: Using your own BOOT_COMPLETED recevier

YourBootCompletedReceiver.java

...
public final void onReceive(final Context context, final Intent intent) {
...
StateTrackingSBR.CheckStartupEvent(context,intent);
...
}