Skip to content

Conversation

@mikescamell
Copy link
Contributor

@mikescamell mikescamell commented Aug 12, 2024

Task/Issue URL: https://app.asana.com/0/1207908166761516/1206826738295232/f

Description

The splashscreen was not showing on devices on devices <= API 30.

To fix this I used the spashscreen-compat library and removed the need for dedicated splashscreen styles on API 31+ as the compat library will take of that for us.

The splashscreen is very quick on a warm start on <= API 30 (see the demos) but I don’t think it’s worth adding any kind of artificial delay to show it for a longer period.

Steps to test this PR

If you have a device that’s <= API 31 to test then please do! Unfortunately I do not have a device on hand at that API level.

  • Pick a device <= API 31 (preferably not an emulator)
  • Install the app
  • Run the app
  • Check that the splashscreen shows
  • Pick a device > API 30 (preferably not an emulator)
  • Install the app
  • Run the app
  • Ensure the splashscreen is still present

UI changes

API 26 before shown as a demo for all devices < 30

I’ve provided some before videos on actual devices on >= API 30

Before After
api26before.mp4
api26.webm
api27.webm
api28.webm
api29.webm
oneplus-api30-before.mp4
oneplus-api30.mp4
pixel3_api31_before.mp4
pixel3-api31.mp4
api32.webm
pixel4a_api33_before.mp4
pixel4a-api33.mp4
pixel8pro_api34_before.mp4
pixel8pro_api34_after.mp4
api35.webm

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @mikescamell and the rest of your teammates on Graphite Graphite

The compat library will take care of this for us so we put everything in the root values files which is the next commit.
As we're not inheriting from any theme we'll need to set the colors for the status bar and navigation bar in the splash style. I'm using what I found on the light and dark themes.
We need to install before super.onCreate is called as per docs.

As we use the LaunchBridgeActivity for routing it's best we call setKeepOnScreenCondition which keeps this activity but stops it from rendering.
@mikescamell mikescamell force-pushed the fix/mike/splash-screen-logo-missing-on-lower-api-levels branch from 0986174 to 0b92a5e Compare August 12, 2024 10:43
@mikescamell mikescamell changed the title Fix splashscreen not showing < API 30 Fix splashscreen not showing <= API 30 Aug 12, 2024
@mikescamell mikescamell marked this pull request as ready for review August 12, 2024 12:44
@anikiki anikiki self-assigned this Aug 12, 2024
Copy link
Contributor

@anikiki anikiki left a comment

Choose a reason for hiding this comment

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

Looks good and works as expected! 🎉

@mikescamell mikescamell merged commit c0eed65 into develop Aug 15, 2024
@mikescamell mikescamell deleted the fix/mike/splash-screen-logo-missing-on-lower-api-levels branch August 15, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants