flutter_native_splash icon indicating copy to clipboard operation
flutter_native_splash copied to clipboard

image does not appear when you start the application with android 12 api 32

Open pedroprenhaca opened this issue 10 months ago • 11 comments

Describe the bug

The image does not appear when you start the application from scratch, however when it is started using the application icon the image appears normally, this only happens when I use the Pixel 8 with Android 12 API 32, versions below 12 and above 12 the image appears normally.

Configuration

flutter_native_splash:
  android: true
  ios: true
  web: false

  color: "#0F80B9"
  image: assets/splash/seo_mercato_1152_1152.png
  image_dark: assets/splash/seo_mercato_1152_1152_dark.png
  color_dark: "#121212"

  android_12:
    color: "#0F80B9"
    image: assets/splash/seo_mercato_1152_1152.png
    image_dark: assets/splash/seo_mercato_1152_1152_dark.png
    color_dark: "#121212"

Device (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]

Screenshots

starting first time

Image

after already started

Image

Additional context Add any other context about the problem here.

pedroprenhaca avatar Feb 19 '25 18:02 pedroprenhaca

I am facing this problem as well. Image logo won't show when application is first launched after install.

shetuolindo avatar Feb 24 '25 08:02 shetuolindo

@pedroprenhaca are you sure you are having this problem with API 32? There was a problem with API 31 (which is also Android 12), but I am not aware of any problem on API 32.

jonbhanson avatar Mar 09 '25 21:03 jonbhanson

@jonbhanson Redmi Note 13 device (Xiaomi HyperOS, Android 14)

bullets-jyr avatar Mar 10 '25 04:03 bullets-jyr

@jonbhanson yes, I did several tests and there is a problem with api 32

pedroprenhaca avatar Mar 10 '25 20:03 pedroprenhaca

@jonbhanson Samsung Galaxy A23, Android 14, One UI 6.1

recsater-hajong avatar Mar 10 '25 20:03 recsater-hajong

Guys, it's probably not the cell phones that are having problems, but rather API 32. Try downloading the same cell phones with API 33 or 31 to test.

pedroprenhaca avatar Mar 12 '25 12:03 pedroprenhaca

@pedroprenhaca My device is using API 33. It's not the phone, I believe that also. I tested it on few more devices.

shetuolindo avatar Mar 12 '25 19:03 shetuolindo

Add this line to your styles.xml file:

<item name="android:windowSplashScreenBehavior">icon_preferred</item>

It is a new setting added in Android 13. More information: https://developer.android.com/develop/ui/views/launch/splash-screen

I think the package should be updated to reflect this.

MichalPleban avatar Apr 09 '25 22:04 MichalPleban

I found that this problem occurs on Android 12 after running through the launcher, such as android studio. However, if the apk is installed through adb install, the launch icon can be displayed normally for the first time.

zhwIdea avatar May 23 '25 08:05 zhwIdea

Hello, this is happening even in real device. I tried with the above possible solution but for me is not working. Any updates on this ?

FrancoTerranovaJob avatar Jun 11 '25 04:06 FrancoTerranovaJob

I am also facing this problem. When the application is first launched after installation, the image logo will not be displayed. The follow-up is normal

herowws avatar Jun 30 '25 06:06 herowws