diff --git a/android/capacitor/src/main/java/com/getcapacitor/Bridge.java b/android/capacitor/src/main/java/com/getcapacitor/Bridge.java index fcc562331..b17682b2a 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/Bridge.java +++ b/android/capacitor/src/main/java/com/getcapacitor/Bridge.java @@ -152,6 +152,11 @@ public Bridge(Activity context, WebView webView, List> i this.config = new CapConfig(getActivity().getAssets(), config); Logger.init(this.config); + // Display splash screen if configured + if (context instanceof BridgeActivity) { + Splash.showOnLaunch((BridgeActivity) context, this.config); + } + // Initialize web view and message handler for it this.initWebView(); this.msgHandler = new MessageHandler(this, webView, pluginManager); diff --git a/android/capacitor/src/main/java/com/getcapacitor/BridgeActivity.java b/android/capacitor/src/main/java/com/getcapacitor/BridgeActivity.java index 24541b02d..dad3dfb73 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/BridgeActivity.java +++ b/android/capacitor/src/main/java/com/getcapacitor/BridgeActivity.java @@ -82,8 +82,6 @@ protected void load(Bundle savedInstanceState) { cordovaInterface.onCordovaInit(pluginManager); bridge = new Bridge(this, webView, initialPlugins, cordovaInterface, pluginManager, preferences, this.config); - Splash.showOnLaunch(this, bridge.getConfig()); - if (savedInstanceState != null) { bridge.restoreInstanceState(savedInstanceState); }