diff --git a/android/capacitor/src/main/java/com/getcapacitor/Bridge.java b/android/capacitor/src/main/java/com/getcapacitor/Bridge.java index 0a48d3ec9..825d44239 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/Bridge.java +++ b/android/capacitor/src/main/java/com/getcapacitor/Bridge.java @@ -143,6 +143,10 @@ public Bridge( this.config = new CapConfig(getActivity().getAssets(), config); Logger.init(this.config); + 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 806591fb6..8b47c94f6 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/BridgeActivity.java +++ b/android/capacitor/src/main/java/com/getcapacitor/BridgeActivity.java @@ -78,8 +78,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); }