I am using splash screen API , everything is working fine but it doesn't show icon on android 5.0 and 5.1.
SplashScreen API Version
implementation 'androidx.core:core-splashscreen:1.0.0'
Theme.xml
<style name="Theme.Splash" parent="Theme.SplashScreen.IconBackground">
        <item name="postSplashScreenTheme">@style/Theme.MyTheme</item>
</style>
MainActivity.kt
val splashScreen = installSplashScreen()
Manifest.xml
<application
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:name=".CarApplication"
        android:theme="@style/Theme.Splash"
        tools:targetApi="31">
        <activity
            android:theme="@style/Theme.Splash"
            android:name=".presentation.MainActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
 </application>
Android Version 11

Android Version 5.0

Now all I need to do is show the icon on devices with android 5.0 as well. I did everything in the documentation but it doesn't seems to work with android 5.0
Just found out after hours digging on the lib code :))). There is a comment on androidx.core.splashscreen.SplashScreen class:
On API 21-22, The icon isn't displayed until the application starts, only the background is visible.
Known incompatibilities: https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With