Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play Console Pre-Launch Warning "Double splash screen"

Doesn't matter what I do, Play Console always shows a warning on my pre-launch report:

The crawler detected a blank loading screen or a custom splash screen that is shown in your app after the system splash screen. Users launching your app on Android 12 or higher will see 2 splash screens. To fix this issue, update your app to use the SplashScreen API.

I followed the instructions from https://developer.android.com/develop/ui/views/launch/splash-screen and https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreen but nothing works... The warning is always there.

I suspect this is a false positive. When I watch the innumerous videos that the pre-report gives me "showing" the issue, there's absolutely nothing wrong, no double splash screens nor anything...

Has anyone seen this? How to solve it?

like image 529
Bruno Avatar asked Feb 27 '26 23:02

Bruno


1 Answers

METHOD 1: Add to your style

<item name=”android:windowIsTranslucent”> true </item> 

Example :

    <style name="RemoveAppSplashTheme" parent="@style/AppBaseTheme">
    <item name="android:windowIsTranslucent">true</item>
    </style>

Apply this theme to your app splash screen Activity.

 <activity
   android:name="com.app.SplashScreenActivity"
   android:theme="@style/RemoveAppSplashTheme"
   android:launchMode="singleInstance" />

============================================================

METHOD 2:

We can suspend the application to draw an existing splash screen and show the system splash screen until the application is ready. This will solve the app delay problem

private void setupOnPreDrawListenerToRootView() {
   View pView = findViewById(android.R.id.content);
   pView.getViewTreeObserver().addOnPreDrawListener(
        new ViewTreeObserver.OnPreDrawListener() {
            @Override
            public boolean onPreDraw() {
               // Check if the initialization is done or not.
               if (isAppInitialized) {
                   // The content is ready, then start main activity.
                   pView.getViewTreeObserver().removeOnPreDrawListener(this);
                   startActivity(new Intent(this, MainActivity.class));  
                   return true;
               } else {
                   // The content is not ready, then suspend.
                   return false;
               }
           }
       });
}

☻♥ Done Keep Code.

like image 122
Nikhil S Marathe Avatar answered Mar 02 '26 15:03

Nikhil S Marathe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!