Setting SDKMode Activity
SettingSDKModeActivity is responsible for managing the SDK mode. It allows the user to switch between Online and Offline modes, displays relevant UI elements, and ensures the SDK is initialized accordingly.
Functions
Sets the button state for Online and Offline buttons based on the current SDK mode.
Sets up the listeners for UI elements like buttons and icons.
Displays the privacy policy information in a BottomSheetDialog.
Switches the SDK mode to Offline and reinitializes the SDK if the model file exists. If the model file doesn't exist, it starts the DownloadProgressActivity.
Switches the SDK mode to Online and reinitializes the SDK if needed.
Validates the current SDK mode and ensures that if the mode is Offline, the necessary model file exists. If not, it switches the mode to Online.