Closed Bug 1839522 Opened 2 years ago Closed 2 years ago

[Splash screen] add splash screen compat implementation

Categories

(Firefox for Android :: Onboarding, task, P1)

All
Android
task

Tracking

()

VERIFIED FIXED
116 Branch
Tracking Status
firefox116 --- verified

People

(Reporter: mavduevskiy, Assigned: mavduevskiy)

References

Details

(Whiteboard: [fxdroid])

Attachments

(4 files)

Implement the splash screen compat library to keep the existing splash screen behaviour on android 12+, and mimic this behaviour in older versions. The splash screen should be shown for a longer period of time during the very first launch of the app based on the experiment..

Some tech findings:

  • Splash screen with just a static icon doesn’t show icons on 21 and 22 API. Google docs cautiously states On API 21-22, The icon isn't displayed until the application starts, only the background is visible. but after extensive testing, it doesn’t show at all on those versions. I suggest we exempt those versions from the experiment not to make people stare at the white background for 10 seconds.
  • Version 23 can not show vector images, that we are using for app icons. I used the .png app icon for that , which makes it look a bit blurry since a 192pxl image is displayed as a 160dp (roughly 3.5x bigger)
  • The default system implementation is to use a icon without background in dark mode (it is slightly bigger, 192dp) and with in the light mode. I kept the behaviour for versions 29+ (that support dark/light modes).

I suggest we exempt those versions from the experiment not to make people stare at the white background for 10 seconds

That's fine with me, as long as that's something we have control over in the Nimbus experiment. Users on API 21-22 account for 1.07% of our overall userbase.

Version 23 can not show vector images, that we are using for app icons. I used the .png app icon for that , which makes it look a bit blurry since a 192pxl image is displayed as a 160dp (roughly 3.5x bigger)

This should be a product judgment call (are we OK with 1.12% of users getting a blurry logo) - :daniela, what say you? The warning I'll remind folks of is that our APK is tip-toeing really close to the Google Play size limit, so we need to be careful about adding large PNG files and pushing it over.

The default system implementation is to use a icon without background in dark mode (it is slightly bigger, 192dp) and with in the light mode. I kept the behaviour for versions 29+ (that support dark/light modes).

I'm not sure I understand the implications of that comment. What does it look like on API 28 and below?

Flags: needinfo?(darcese)

The default system implementation is to use a icon without background in dark mode (it is slightly bigger, 192dp) and with the background in the light mode. In the link you can see too images illustrating splash screen with icon background and without it.

So, my implementation is the same: the light mode will have white background and an icon with an icon background behind it. The dark mode will have dark background and an icon without an icon background. Sorry, making screenshots here is painful – but if you launch the app in different dark/light modes you will see it. There is a blue background in the light theme and no background at all in the dark.

Light/dark modes were introduces in API 29, so starting from that version the Firefox splash-screen will adjust to the theme.

Can I see a screenshot of the the blurry logo?
Have we ever targeted experiments based on API? I would have to look into whether we can do that.

Flags: needinfo?(darcese)
Attached image vector image vs png

That's how app logo used for the splash screen looks on api 24 (android 6).

:daniela

I don't see a way to target audience based of the OS version. Also, experimenter file doesn't hint that it's possible, there is no mentions of the version.

Let's ask somebody from the Nimbus team if it's possible to target experiments for specific android OS version.

Flags: needinfo?(jhugman)

It is possible to target on Android OS version, though not exposed in Experimenter.

The blessed way of adding an audience segment is to raise a PR in experiment to add a constant to the targeting/constants.py.

Flags: needinfo?(jhugman)

Authored by mike a
https://github.com/mozilla-mobile/firefox-android/commit/ea0bcebcefee15bd976cbae1fb16139ab2f09755
[main] Bug 1839522 – added splash screen compat implementation, tied extra duration to the experiment

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: qe-verify+
Resolution: --- → FIXED
Target Milestone: 115 Branch → 116 Branch

Verified as implemented on several devices, on the latest Fenix Nightly 116.0a1 from 6/27, and 6/28:

  • Sony Xperia Z5 Premium (Android 7.1.1),
  • Xiaomi mi4i (Android 5.0.2 - API 21 - there is only a white blank screen - see the attached short video),
  • Google Pixel (Android 13), and
  • Samsung Galaxy Note 8 (Android 9).

Mike, please review and advise. Thank you!

Here is how the splash screen is displayed on Sony Xperia Z5 Premium (Android 7.1.1).

Flags: needinfo?(mavduevskiy)

I'll remove the ni for Mike, because I received the answer: "The feature is disabled on android devices which run android versions lower than API 23. The splash screen library fails to draw the icon for those versions.".
I'll mark this ticket as verified.

Flags: needinfo?(mavduevskiy)
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Regressions: 1841057
Regressions: 1843244
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: