I am facing an issue of Android compatibility that warns me that there is a double splash screen, which is not true. I checked my implemenation and did not find any double splash screen. Also, there is only one splash screen to see when the app gets started.
Here is, how I implemented: themes.xml
<resources>
<style name="Theme.<App_Name>" parent="android:Theme.Material.Light.NoActionBar" />
<style name="Theme.<App_Name>.SplashScreen" parent="Theme.SplashScreen">
<item name="postSplashScreenTheme">@style/Theme.<App_Name></item>
<item name="windowSplashScreenBackground">@android:color/white</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher_foreground</item>
<item name="android:windowLightStatusBar">true</item>
</style>
</resources>
My AndroidManifest.xml:
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:enableOnBackInvokedCallback="true"
android:fullBackupContent="@xml/backup_rules"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:localeConfig="@xml/locales_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.<App_Name>.SplashScreen"
tools:targetApi="tiramisu">
<activity
android:name=".activities.MainActivity"
android:exported="true"
android:hardwareAccelerated="true"
android:theme="@style/Theme.<App_Name>"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
My MainActivity:
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
var isSplash = true
installSplashScreen().setKeepOnScreenCondition { isSplash }
Handler(Looper.getMainLooper()).postDelayed({ isSplash = false }, 800)
// ...
}
}
Splash screen dependency version:
implementation("androidx.core:core-splashscreen:1.0.1") // The latest one.
Why does Play console warns that there is a doble splash screen? This warning appered in my very recent release upload. I had not that in previus releases.