Initializes the SDK in a background thread and shows a loading dialog. This ensures the SDK is set up correctly after switching modes.