Reputation: 4527
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?
Upvotes: 13
Views: 9930
Reputation: 497
I see some issues related with double splash screen thing on Google's issue tracker.
False positive warning on Google Play Console "Double SplashScreen"
Duplicate Splash Screen Issue on Google Play Console Pre-Launch Report
They suggest that many users are experiencing this as well. Pre-Launch Reports show that Google Pixel 7 emulators generally experienced this warning.
It seems like the condition or test triggering this warning is unreliable. Unfortunately, there’s still no response from Google engineers. But I think it is some kind of false positive situation.
Upvotes: 0
Reputation: 781
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.
Upvotes: 2
Reputation: 2238
"Double splash screen" warning on google play console is triggered when using splash screen API together with activity that have only one view (e.g. some kind of animation).
If you want to keep your animation screen (old splash screen) for any reason (like loading ads or else), just put another view on that activity, for example progress bar.
That will suppress Play console to mark that activity as splash screen and warning will gone away.
Upvotes: 2