godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.79k stars 20.13k forks source link

App icon flashes before boot_splash on Android #95131

Closed EiTaNBaRiBoA closed 1 week ago

EiTaNBaRiBoA commented 1 month ago

Tested versions

System information

Windows 10 - Godot v4.3.RC2 - Forward+

Issue description

When exporting a Godot project to Android, a brief but noticeable flash of the app icon occurs before the intended boot splash (image or color set in Project Settings -> Application -> Boot Splash) is displayed. This Brief icon display cannot be hidden or replaced using current Godot settings.

https://github.com/user-attachments/assets/ef495720-3029-439f-ae72-679d6fc37d1a

Steps to reproduce

  1. Create a new Godot project or use an existing one.
  2. Set a Boot Splash image or color: Go to Project Settings -> Application -> Boot Splash and either select an image or define a background color.
  3. Export the project for Android: Configure the export settings to android.
  4. Observe the app launch sequence: Pay close attention to the screen immediately after launching the app. You should briefly see the app icon displayed before the boot splash image/color appears.

Minimal reproduction project (MRP)

AppIcon.zip

Calinou commented 1 month ago

What does your app icon look like before launching it? I believe the pre-launch icon is based on Android design assets; it is not drawn by Godot itself. This means that you need to configure your project to use assets you created for this purpose in the Android export preset in the Export dialog.

Godot can generate those assets for you if you leave the field empty, but you'll still need to define an icon at the very least.

EiTaNBaRiBoA commented 1 month ago

What does your app icon look like before launching it? I believe the pre-launch icon is based on Android design assets; it is not drawn by Godot itself. This means that you need to configure your project to use assets you created for this purpose in the Android export preset in the Export dialog.

Godot can generate those assets for you if you leave the field empty, but you'll still need to define an icon at the very least.

I am not sure i understand what you mean, if you could explain. For your question the icon of the app is the godot icon svg. when launching the app, the expected result is to see the boot splash color (which the video example i set it to pink) but instead the app shows before the boot splash the icon of the app in the middle and this behaviour cannot be changed in godot project settings. If i open other apps on my phone they do not show their icon on launch

Alex2782 commented 1 month ago

How did you configure Icon?

If i open other apps on my phone they do not show their icon on launch

My Samsung Tab S7 (Android 13) shows the app icon in the splash screen first. (always, also other apps)

Bildschirmfoto 2024-08-06 um 18 39 43

Example: https://github.com/godotengine/godot-demo-projects/tree/master/2d/bullet_shower

Bildschirmfoto 2024-08-06 um 18 42 38

I am not sure i understand what you mean

I think this settings (Android Export)

image

EiTaNBaRiBoA commented 1 month ago

How did you configure Icon?

If i open other apps on my phone they do not show their icon on launch

My Samsung Tab S7 (Android 13) shows the app icon in the splash screen first. (always, also other apps)

Bildschirmfoto 2024-08-06 um 18 39 43

Example: https://github.com/godotengine/godot-demo-projects/tree/master/2d/bullet_shower

Bildschirmfoto 2024-08-06 um 18 42 38

I am not sure i understand what you mean

I think this settings (Android Export)

image

Thanks for the suggestion, I tried setting the main icon to 192x192 in the android export settings, but the issue still remains. I still see the default icon briefly before the splash screen appears.

  1. I tested on Godot 4.2.2 and this issue doesn't occur.
  2. I opened the project using godot 4.2.2 and exported to my phone and launched it.
  3. No icon was displayed but only splash screen and the app.
  4. I closed the project and opened it in godot 4.3. i exported the app to my phone and the icon app was displayed before the splash screen.
  5. I also tried to make the project in godot 4.3 and exporting it to my phone and the app icon was displayed before the splash screen.

All were the same project settings and same export settings Could this be a regression?

Alex2782 commented 1 month ago

I tried setting the main icon to 192x192 in the android export settings, but the issue still remains. I still see the default icon briefly before the splash screen appears.

maybe PR #92965

or/and Gradle Build? I have deactivated Gradle Build and configured an icon. It worked on Android 13 - Samsung.

Screenshot 2024-08-10 231159

image

godot-assets.svg ![godot-assets](https://github.com/user-attachments/assets/6fea4835-cad0-40af-8a60-e0aeabb92ab3)
EiTaNBaRiBoA commented 1 month ago

I tried setting the main icon to 192x192 in the android export settings, but the issue still remains. I still see the default icon briefly before the splash screen appears.

maybe PR #92965

or/and Gradle Build? I have deactivated Gradle Build and configured an icon. It worked on Android 13 - Samsung.

Screenshot 2024-08-10 231159

image

godot-assets.svg

Both godot 4.2.2 and godot 4.3 that i tested on the same project used the same export settings and project settings. Godot 4.3 did reproduce the issue and godot 4.2.2 didn't reproduce the issue

akien-mga commented 1 month ago

AFAIK the fact that an icon is shown when starting the app is intended behavior from Android itself. Apps built against recent SDKs behave this way, while some (possibly older) apps don't.

Now regarding why it's the default Godot icon, did you change the main project icon in the project settings? In my tests my custom icon.svg would be shown on Android just fine.

CC @m4gr3d

EiTaNBaRiBoA commented 1 month ago

AFAIK the fact that an icon is shown when starting the app is intended behavior from Android itself. Apps built against recent SDKs behave this way, while some (possibly older) apps don't.

Now regarding why it's the default Godot icon, did you change the main project icon in the project settings? In my tests my custom icon.svg would be shown on Android just fine.

CC @m4gr3d

Thanks for the reply, i know how to change the app icon and it wasn't part of the issue. The issue was opened due to what you said that the app icon shows before the display splash is due to the new sdk, do you think is it possible somehow to remove it or is it the new standard of android?

Alex2782 commented 1 month ago

@EiTaNBaRiBoA In your MRP Gradle Build is active, but you have not added the files to the zip file.

https://docs.godotengine.org/en/latest/tutorials/export/android_gradle_build.html https://developer.android.com/develop/ui/views/launch/splash-screen?hl=en

I haven't tried it yet, but it should be possible if you customize files. You should be familiar with Android development.

screenshots ![image](https://github.com/user-attachments/assets/08fa3704-df84-4813-8ddf-8b2077c52922) ![image](https://github.com/user-attachments/assets/634b6af6-5dbe-4a15-a009-1db8226d11c4) ![image](https://github.com/user-attachments/assets/c0f1df49-9b32-4f0f-b030-62dc87d019f4)
m4gr3d commented 1 month ago

do you think is it possible somehow to remove it or is it the new standard of android?

@EiTaNBaRiBoA It's the new Android standard.

Starting in Android 12, the system applies the Android system default splash screen on cold and warm starts for all apps. By default, this system splash screen is constructed using your app's launcher icon element and the windowBackground of your theme, if it's a single color.

QAQ-HYSJ commented 1 week ago

Is it possible to disable the display of the app icon? when open the app or game, the app icon will be displayed first, then a gray drop-down animation will appear, then the boot splash appears, and finally the app will be entered, which is really ugly.

https://github.com/user-attachments/assets/df9e269e-2390-4bd4-a064-d09f7dbb8ad2

m4gr3d commented 1 week ago

No it's not possible to disable the app icon; as mentioned in the comment above this is the new Android standard.

m4gr3d commented 1 week ago

Closing this issue as intended behavior.