Open jibbers42 opened 1 year ago
I wanted to reach out regarding an issue I'm experiencing with the native_splashscreen on Android 12. I've tested it on versions 11, 12, and 13, and here's what I found:
I've tried various approaches, but on Android 12, there seems to be no way to make the image display. Have you encountered a similar problem, or do you have any insights on resolving this?
this is my configuration:
flutter_native_splash:
color: "#8F497B"
image: assets/images/winesip_splashscreen.png
fullscreen: true
ios_content_mode: scaleToFill
android_gravity: fill
web: false
android_12:
color: "#8F497B"
image: assets/icons/launcher/android/splashScreen_android12.png
@labrujasiete Android 12 has an issue where it doesn't show the app icon on the splash screen when launched from another process (https://issuetracker.google.com/issues/205021357). That may also apply to using image
, I'm not sure.
Try force killing the app then running if from the device launcher and see if the image shows up.
@labrujasiete Android 12 has an issue where it doesn't show the app icon on the splash screen when launched from another process (https://issuetracker.google.com/issues/205021357). That may also apply to using
image
, I'm not sure.Try force killing the app then running if from the device launcher and see if the image shows up.
Yes, i've already come across this tip and i've already tried force killing the app and launching it from the device launcher, as suggested, but the issue persists.
on Android 12, flutter 3.16.3 white screen:
flutter_native_splash:
background_image: assets/splash.png
image: assets/appicon.png
web: false
android_gravity: clip_horizontal
ios_content_mode: scaleAspectFill
I experienced the issue after upgrading flutter from 3.10.5.
@jibbers42 yes, icon_background_color
should set the color of your icon's background. Do you have areas of transparency in your icon where the background color can show through? Also, have you tried changing the color to something like "#FF0000" to see if it shows through? I don't believe Android 12+ supports full screen splash screens.
@jibbers42 yes, icon_background_color should set the color of your icon's background. Do you have areas of transparency in your icon where the background color can show through? Also, have you tried changing the color to something like "#FF0000" to see if it shows through? I don't believe Android 12+ supports full screen splash screens.
The provided config does not specify an image for android_12
, so it should use the launcher icon. I used this project's example app with the default flutter icons which does seem to use a transparent background.
Given this config on API 33:
flutter_native_splash:
color: "#00ff00"
image: "assets/splash.png"
android_12:
color: "#00ff00"
icon_background_color: "#ff0000"
ios: false
web: false
android_gravity: fill
fullscreen: true
I get:
It seems like the white in the icon should be red, unless I'm misunderstanding something.
@jibbers42 I'm not sure if it supports transparency in the end, so i think we should make the icon image to the desire color, Everything else seems to be working fine, as to API 33
I've been experiencing similar struggles as well. Adding a comment to bump the issue.
The background image is not shown even though I gave background_image(issue only in android 12+).
My configuration:
flutter_native_splash:
image: assets/rdr.png
background_image: assets/sc.png
fullscreen: true
android_gravity: fill
ios_content_mode: center
android_12:
image: assets/rdr.png
background_image: assets/sc.png
fullscreen: true
android_gravity: fill
ios_content_mode: center
web: false
[✓] Flutter (Channel stable, 3.16.9, on Ubuntu 22.04.3 LTS 6.5.0-17-generic, locale en_IN) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) [✓] Chrome - develop for the web [✓] Linux toolchain - develop for Linux desktop [✓] Android Studio (version 2023.1) [✓] Android Studio (version 2021.2) [✓] IntelliJ IDEA Community Edition (version 2023.1) [✓] VS Code (version unknown) ✗ Unable to determine VS Code version. [✓] Connected device (3 available) [✓] Network resources
• No issues found!
I observe similar issues as mentioned above.
Thank you for the wonderful package.
I have experienced a similar issue. After upgrading Flutter SDK from version 3.7.8 to 3.19.1, the image specified for the splash screen is not displayed only on the first launch of the app.
environment:
sdk: ">=3.0.0 <4.0.0"
# ...
dependencies:
flutter_native_splash: ^2.3.10
# ...
flutter_native_splash:
color: "#ffffff"
image: "assets/img/logo_splash.png"
color_dark: "#ffffff"
image_dark: "assets/img/logo_splash.png"
android_12:
icon_background_color: "#ffffff"
image: "assets/img/logo_splash_android.png"
icon_background_color_dark: "#ffffff"
image_dark: "assets/img/logo_splash_android.png"
I am using on Android 14. I am facing similar issues Also I can not set color to white if device is in dark mode as stated in issue #485. Icon background color has no effect and I can not set custom image as my splash screen
@afzl-wtu Did you find any solution?
any solution for this issue :(?
?
any solution ?
Any solution?
@jibbers42 based on my testing it seems that if Android uses the app icon (in the example this comes from mipmaps), the transparency in the image turns into a white background. I do not know why this is the case. If I set an image in the config and run the create command, then the icon background color shows in the transparent areas as expected.
Attention: If you open a bug report without sufficient details, it will be closed. Is your question related to Android 12? Please check the notes on Android 12 first (https://pub.dev/packages/flutter_native_splash#android-12-support).
Describe the bug
icon_background_color
does not seem to have any effect. My assumption is that this setting should change the color of the circle behind the icon.fullscreen
does not seem to have any effect on Android 12+. On Android 11 the system bars do not show.Configuration
Device (please complete the following information):
Device: emulator v32.1.15-10696886 OS: Android 13
Device: emulator v32.1.15-10696886 OS: Android 11
To Reproduce Steps to reproduce the behavior, using the example app:
fullscreen
have no effect on Android 12+Additional context The readme links to https://developer.android.com/about/versions/12/features/splash-screen, I'm not sure if I'm supposed to make a changes listed there, but I did add
implementation "androidx.core:core-splashscreen:1.0.0"
to my build.gradle as a test, but it had no effect.