Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28473] Android: Address splash screen breaking-changes on Android 12

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2021-08-24T14:13:20.000+0000
Affected Version/sn/a
Fix Version/sRelease 10.1.0
ComponentsAndroid
Labelsandroid, splash, splash-screen
ReporterJoshua Quick
AssigneeJoshua Quick
Created2021-06-05T02:10:35.000+0000
Updated2021-08-24T14:13:20.000+0000

Description

*Summary:* Google has made a breaking-change to an app's splash screen handling as of Android 12 whether you target it or not. Android 12 now ignores the android:windowBackground attribute. This means the Titanium project's "default.png" will be ignored on Android 12 during a cold start, but it will be displayed after the cold start ends. https://developer.android.com/about/versions/12/features/splash-screen Android 12 shows the app's icon in the splash instead of the "default.png" image. If the app is not set up to use android:roundIcon, then the app's icon will be clipped via a circle mask as shown below and this may not look good for most apps. ||Splash 1st shows app icon|| ||Next shows default.png|| | !SplashScreenIssue.png|thumbnail! | -> | !SplashScreenOldBehavior.png|thumbnail! | *Note:* This impacts all apps that run on Android 12 regardless of what API Level they target. *To-Do:* On Android 12: * Do not show Titanium's splash if Android 12's splash is shown. (Avoids double splash on startup.) * Do not support legacy "default.png"/"background.png" on Android 12 and higher. _(Icon-only splash is being forced on all apps on Android 12. You cannot opt-out.)_ Make legacy "default.png"/"background.png" *optional* on Android 11 and older: * If splash image is found, then it will be shown the same as before. * If not found, then icon-only splash will be shown just like Android 12. * Support "roundIcon" in splash on Android 8 and higher if configured in manifest. * Remove all legacy "default.png" images from Titanium app templates. *Work-Around:* Set up your app to use an adaptive icon and add an android:roundIcon attribute to the <application/> as shown in the hyperloop-examples project. https://github.com/appcelerator/hyperloop-examples/blob/master/tiapp.xml#L64

Attachments

FileDateSize
SplashScreenIssue.png2021-06-05T01:58:55.000+0000436182
SplashScreenOldBehavior.png2021-06-05T02:27:44.000+0000904630

Comments

  1. Hans Knöchel 2021-07-05

    Rounded app icons are also affected by this, because it shows the round icon and then the launch screen (9 patch in our case).
  2. Joshua Quick 2021-08-16

    PR (titanium_mobile): https://github.com/appcelerator/titanium_mobile/pull/13026

JSON Source