Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Android splash screen logic #92965

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

m4gr3d
Copy link
Contributor

@m4gr3d m4gr3d commented Jun 10, 2024

Due to limitations introduced in Android 12, the Godot splash screen logic has been updated to the same logic as used on other platforms; the splash screen is rendered by the Godot engine instead of the Android runtime.

This PR has been split in two commits for code clarify:

  • dd966f5 updates the splash screen for the Android Editor
  • f20e21a updates the splash screen for the Godot Android app template

Fixes #69317
Fixes #62863
Fixes #74348

Due to limitations to the splash screen introduced in Android 12, the splash screen logic is updated to the same logic as used on other platforms, i.e: the splash screen is rendered by the Godot engine instead of the Android runtime.
@Alex2782
Copy link
Contributor

and #74348 ?

@m4gr3d
Copy link
Contributor Author

m4gr3d commented Jun 12, 2024

and #74348 ?

@Alex2782 It should fix that issue as well when using the mobile renderer. For the compatibility renderer, #92966 will need to be fixed as well.

@akien-mga
Copy link
Member

Tested on a Pixel 7a, it seems to work ok, but I feel users might not be fully satisfied with the first splash screen shown (managed by the OS I guess?). It just shows the game icon, before moving on to the Godot-managed splash screen.

Here's a test from this PR using https://github.com/KenneyNL/Starter-Kit-3D-Platformer/

1000004491.mp4

The screen recording app was a bit confused by the orientation change, so it actually looks better on device, where it transitions smoothly from this:

image

To this:

image

(Don't mind the size differences, I just cropped the wrongly oriented images from the video - on device both of them are properly fullscreen landscape from the start.)

@akien-mga
Copy link
Member

Tested 4.3-beta1 to compare and I can confirm this is a net improvement, in 4.3-beta1 it would show the same first splash screen with just the app icon, and then a black screen.

@m4gr3d
Copy link
Contributor Author

m4gr3d commented Jun 13, 2024

Tested on a Pixel 7a, it seems to work ok, but I feel users might not be fully satisfied with the first splash screen shown (managed by the OS I guess?). It just shows the game icon, before moving on to the Godot-managed splash screen.

The first splash screen is indeed provided by the OS; Google has been adding more limitations to it starting with Android 12, so there's not much we can do to customize that unfortunately. Other frameworks have been complaining as well about the imposed limitations :(

@owlnewworlds
Copy link

As a Godot developer who's developing a mobile game and who's waiting impatiently this fix, I can say that this is a great improvement. Every other game (Godot or not) seems to have inevitably a pre-screen with the app icon (it can be on a white background or black or whatever color - I'm wondering the source of this color...) displayed and then the splashscreen. So if we have the splashscreen displayed instead of the black screen, it sounds perfect to me.

@akien-mga
Copy link
Member

Tested 4.3-beta1 to compare and I can confirm this is a net improvement, in 4.3-beta1 it would show the same first splash screen with just the app icon, and then a black screen.

Actually the first splash screen shown by 4.3-beta1 has a different background color. Might be the game's default clear color? Or maybe it's just a coincidence.

Is it intentional that after this PR the background color changed to a dark one? (I do have dark theme on, so that might be why.)

1000004492.mp4

The first splash screen is indeed provided by the OS; Google has been adding more limitations to it starting with Android 12, so there's not much we can do to customize that unfortunately. Other frameworks have been complaining as well about the imposed limitations :(

I tested a few other non-Godot apps and indeed most seem to have this first splash screen which is just the app icon on a dark background (Marvel Snap, Discord, Babbel), but others still have a custom full screen splash (WhatsApp, Signal, Twitch, Rocket.chat). Might be worth looking into, but for now this seems pretty good.

@m4gr3d
Copy link
Contributor Author

m4gr3d commented Jun 13, 2024

(it can be on a white background or black or whatever color - I'm wondering the source of this color...)

@owlnewworlds For Godot, you should be able to customize the source of the background color (after this PR lands) via the launcher_icons/adaptive_background_432x432 export option.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works as intended (for Godot apps, didn't test the editor).

@owlnewworlds
Copy link

Might be worth looking into, but for now this seems pretty good.

Yes ^^ At least, the splashscreen feature will be working again, if we can have a real full splashscreen like Whatsapp etc in a future update, it'll be cherry on top.

@akien-mga akien-mga merged commit de8a05f into godotengine:master Jun 13, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

We should probably backport this to 3.x too.

@wombatwingdings
Copy link

Yes, please do port this to 3.x. People are getting their apps rejected because of this. I assume this isn't in 3.6 RC1?

@owlnewworlds
Copy link

(it can be on a white background or black or whatever color - I'm wondering the source of this color...)

@owlnewworlds For Godot, you should be able to customize the source of the background color (after this PR lands) via the launcher_icons/adaptive_background_432x432 export option.

Just getting back to you to confirm (maybe it wasnt necessary lol) that using the export setting you told me works like a charm to change the background color behind the app icon before the splashscreen is displayed.

@alexzheng
Copy link

3.6 still has this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Bad
6 participants