Status Update
Comments
al...@google.com <al...@google.com>
gm...@gmail.com <gm...@gmail.com> #2
Hit this issue too. Some additional observations:
- This also affects default splash screen (
windowBackground
+ launcher icon), without core-splashscreen library - Icon is shown correctly if app is installed with
adb install
and then started from device launcher
ss...@gmail.com <ss...@gmail.com> #3
I've experienced this as well. Not only does the icon not display from the AS launcher, but it also does not display when sending a deep link from ADB. For example, when using the command: adb shell am start -W -a android.intent.action.VIEW -d "custom://deeplink"
, the app icon does not display. I have sought many solutions on this before finding this open issue.
hi...@gmail.com <hi...@gmail.com> #4
se...@gmail.com <se...@gmail.com> #5
I am facing the same issue. The icon shows on api 30 and lower (tested back to api 23) however no icon displays on api 31, just the background colour which I set.
ay...@rilla.one <ay...@rilla.one> #6
gj...@linkedin.com <gj...@linkedin.com> #7
sm...@gmail.com <sm...@gmail.com> #8
This issue is also happening when the app is launched from the notification. The behavior is inconsistent with previous versions of the OS.
Case 1 (Android 12):
Steps:
- Notification received -> User clicks on the notification -> splash screen with no icon is shown, only the background color.
Case 2 (Android 11)
Steps:
- Notification received -> User clicks on the notification -> splash screen is launched with icon displayed.
I expect the behaviour to be the same for both cases ( <= Android 12), but now I have difference between the two.
ga...@mistplay.com <ga...@mistplay.com> #9
I am also facing this issue when opening a new activity under a new/different process.
- On Android 11 and below, opening a new process shows the splash screen as expected.
- On Android 12, it just shows a blank/black screen.
iv...@gmail.com <iv...@gmail.com> #10
Happens on a physical device, Pixel 6 running latest Android 12. The app in this case is Xamarin.Android.
an...@op.fi <an...@op.fi> #11
em...@gmail.com <em...@gmail.com> #12
I also face the same issue, in Android 11 devices, the logo never show, just display a blank black screen. Background color doesn't change too
em...@gmail.com <em...@gmail.com> #13
I'm using the latest version of a compat library for the new splash api (beta01).
And there is still such issue. When splash is launched from deep link there is no icon displayed, just background is shown.
Below are screenshots from test project with code snippets for more context.
ca...@google.com <ca...@google.com> #14
Thanks for all the reports.
On Android 12:
That's intended. By default it only show from the launcher. If the opening app wants to show the splash screen of the opened app, it needs to do:
Bundle options = ActivityOptions.makeBasic().toBundle() // or just new Bundle()
options.putInt("android.activity.splashScreenStyle", 1)
startActivity(intent, options)
Note that this is not an official API for S but will be in T, it will also be added in a future release of the library.
The splash screen icon won't be shown otherwise, that includes notifications, deeplinks, start from other applications.
For the launch from studio
We are unfortunately constrained on the platform side and the fix will be there for Android T, because it uses adb
to launch the application and there is
On Android 11 and before:
The splash screen should always be shown, but we have instances of non Google devices where the splash screen does not appear and it is being investigated.
If you have a non-google device on Android 11 and the splash screen is not appearing, please comment on
ru...@gmail.com <ru...@gmail.com> #15
And if a user finds the app in the drawer with a search I should think that's also a launch event and should display the splash icon.
I tried to read the android.activity.splashScreenStyle from the extras bundle but is doesn't seem to be there to determine if splashcreen is displayed or not.
gm...@gmail.com <gm...@gmail.com> #16
On Android 12: That's intended. By default it only show from the launcher.
Than it's basically a regression in Android 12 compared to previous versions, where "splash screen via custom theme" worked regardless of how app is launched. It also doesn't seem to be documented anywhere.
lb...@gmail.com <lb...@gmail.com> #17
s....@gmail.com <s....@gmail.com> #18
I find this to only be half true, as the splash screen icon does not show but the splash screen background color does. This is different to the window background colour which I'd expect to see if the splash screen was in fact not showing.
lb...@gmail.com <lb...@gmail.com> #19
tr...@gmail.com <tr...@gmail.com> #20
Cross ref to a seemingly related issue with the core wrapper lib, root cause seems likely the same:
ki...@smartpatient.eu <ki...@smartpatient.eu> #21
Bundle options = ActivityOptions.makeBasic().toBundle() // or just new Bundle()
options.putInt("android.activity.splashScreenStyle", 1)
startActivity(intent, options)
On Samsung that trick works for PendingIntent.getActivity()
but it does not work with PendingIntent.getActivities()
.
ca...@google.com <ca...@google.com> #22
We introduced a new API in Android T (API 33) :
value | int | desc |
---|---|---|
default | 0 | The icon is shown when the launching activity sets the splashScreenStyle to SPLASH_SCREEN_STYLE_ICON. If the launching activity does not specify any style, follow the system behavior. |
icon_preferred | 1 | The icon is shown unless the launching app specified SPLASH_SCREEN_STYLE_EMPTY |
lb...@gmail.com <lb...@gmail.com> #23
1. I don't understand what it is. It seems like it's on the launcher's side? How is it related? We already set how the splash screen is supposed to be shown, and it's even on the support library (android-x)....
2. How can we fix for older API versions?
3. Can you please share a sample project for us to try, and see if it helps?
4. Will this work on all cases I've talked about? Meaning : other launcher, app-info, IDE, adb ... ?
5. Can you please make the default behavior to always have the splash screen work, for all cases, and if the calling app (or whatever that started the app) wishes, there are other flags to start it differently?
ne...@gmail.com <ne...@gmail.com> #24
re...@google.com <re...@google.com>
lb...@gmail.com <lb...@gmail.com> #25
Really even the API is terrible to use for this.
They had the chance to do it right, and they ruined it.
de...@gmail.com <de...@gmail.com> #26
mo...@gmail.com <mo...@gmail.com> #27
I was testing with Android TV emulators: on API 21-22 the icon doesn't show (only background color) and the same goes with API 31
On API 23-30 it works fine.
I tried the following:
* Manual install (adb install...) and running from the Leanback launcher
* Stopping the app and running again
No luck...
wi...@google.com <wi...@google.com> #28
Re #27, unlike other product and due to the UX design, TV(Leanback) doesn't entirely support splash screen API.
lb...@gmail.com <lb...@gmail.com> #29
Only from the Pixel launcher it shows the splash screen reliably.
Dependency:
implementation 'androidx.core:core-splashscreen:1.0.0'
Installed SDK components on the attached video.
Emulator isn't of Android TV, BTW.
re...@google.com <re...@google.com> #30
Hello all,
Thank you for your feedback here. Two main feedback points and action items:
-
Splash screen visibility in Android Studio: As Vadim mentioned earlier we were constrained on the platform side. This is fixed for Android T and will be released shortly.
-
Understanding what launch states trigger the Splash Screen More documentation is coming to help clarify when the full splash screen will be triggered based on entry point (app link, notification, apps list) and launch state (cold vs hot etc).
lb...@gmail.com <lb...@gmail.com> #31
1. What do you mean "Splash screen visibility in Android Studio" ? The Splash screen icon doesn't appear in multiple cases. Not just when opened from the IDE. And it's not fixed on Android 13 and not on any other version of Android. How could this be a good replacement to what we had before?
You had a very good chance to make it right on Android 12, and then on Android 13, and it still doesn't work properly.
And it's also not convenient at all. I expected a new component in the manifest to handle it (use Activity for old Android versions), so that all places would start from it.
2. Should be shown in every case that there is no task of the app yet. Why are you making things more complex than they already are...
ti...@gmail.com <ti...@gmail.com> #32
@22
For Android 13 windowSplashScreenBehavior
@14
For Android 12 options.putInt("android.activity.splashScreenStyle", 1)
works, when launching an activity. Is it possible to use it when app is opened via notification?
lb...@gmail.com <lb...@gmail.com> #33
wi...@google.com <wi...@google.com> #34
Re #32, for Android > 12 version, UX decides to not show the splash screen icon when launch from notification.
SystemUI process has higher priority to decide the behavior.
Note: The launch process can use ActivityOptions#setSplashScreenStyle to decide the prefer splash screen style if the launch target need one, and if this is set, #windowSplashScreenBahavior will be ignored even the launched app has set.
For the notification case, showing the icon can seems unexpected and incontinues during the expand animation. That's the reason we still keep it empty.
lb...@gmail.com <lb...@gmail.com> #35
It shouldn't matter how the app was opened. Shouldn't matter if you can have an animation from some icon before, or not. Showing nothing for a moment is considered like a bug of UI to the user ("there should have been something here, but for some reason it's blank").
If there is no task of it alive, it should show it, just as was done before SplashScreen API was available.
It's a weird, inconsistent behavior not to have splash screen being shown for specific cases.
Stop making it too complex. I avoid using this API in some of the apps I work on, just because of these random decisions of yours.
Keep backward compatibility with what we had before this API.
If it was so important to you to let developers use this API, you should have at least offered to customize when to show it.
lb...@gmail.com <lb...@gmail.com> #36
What's the logic behind not showing it in some cases? Because you can't transition from some icon?
What's more important: actually show the splash screen as part of the API the developer chose to use, or have a transition from some icon?
I see this API as too restricted (mostly just icon, can't add text, can't add ProgressBar,...) and too inconsistent (shows blank screen in most cases), a lot of work for such a simple thing.
Even the loading itself can't be global and still gets to be done on Activity.
I thought you'd offer to set a global class of loading stuff. That it could finally solve the matter that so much initialization is done on the class that extends Application.
You could have done much better than this.
sh...@gmail.com <sh...@gmail.com> #37
lb...@gmail.com <lb...@gmail.com> #38
Anyway, here the post is about not seeing the icon of the splash screen. If you talk about something else, please write it somewhere else...
po...@gmail.com <po...@gmail.com> #39
Here's one possible solution for notifications:
And you can probably do the same trick with deep links too.
bh...@calcey.com <bh...@calcey.com> #40
az...@gmail.com <az...@gmail.com> #41
There is also another scenario when this happens:
- user is in the app
- user clicks on a button which navigates him to app permissions screen
- user declines any permission that was already granted (let's say notification permission)
- user clicks on hardware back button
- The process of the app is being re-created
- User sees solid background color set by
windowSplashScreenBackground
, icon is not displayed - After a while user sees the screen from step 2
ga...@gmail.com <ga...@gmail.com> #42
ma...@gmail.com <ma...@gmail.com> #43
d....@pay-s.ru <d....@pay-s.ru> #44
ro...@gmail.com <ro...@gmail.com> #45
Has anyone experienced this? Can you help please? I'm using cordova/ionic. The problem only on android 12
wi...@google.com <wi...@google.com>
sa...@gmail.com <sa...@gmail.com> #46
ba...@gmail.com <ba...@gmail.com> #47
My goodness what is going on with this API. Read all the queries in the thread.
What we want to achieve.
- We want the ability to show splash screen always or sometimes or in places where the consumers decide.
- You shouldn't randomly decide this. Saying animation won't work properly if we show splash screen because when a consumer is writing an animation from Notification to Full screen that is a niche case not a general case.
- Just give us options like an xml or something to show splash screen always.
All the other case you have talked about are very specific cases which needs to have override case or something.
ke...@gmail.com <ke...@gmail.com> #48
ke...@gmail.com <ke...@gmail.com> #49
This was completely unexpected behaviour for me and I completely agree with
po...@dayalgroup.com <po...@dayalgroup.com> #50
There should be some way to add xml layout in Splash API.
jm...@cars.com <jm...@cars.com> #51
dv...@gmail.com <dv...@gmail.com> #52
<item name="android:windowSplashScreenBehavior">icon_preferred</item>
reference:
xi...@gmail.com <xi...@gmail.com> #53
rp...@bigw.com <rp...@bigw.com> #54
go...@gmail.com <go...@gmail.com> #55
pe...@gmail.com <pe...@gmail.com> #56
fa...@gmail.com <fa...@gmail.com> #57
tu...@gmail.com <tu...@gmail.com> #58
fa...@gmail.com <fa...@gmail.com> #59
ha...@ryd.one <ha...@ryd.one> #60
mi...@gmail.com <mi...@gmail.com> #61
te...@gmail.com <te...@gmail.com> #62
zz...@royalenfield.com <zz...@royalenfield.com> #63
d....@pay-s.ru <d....@pay-s.ru> #64
ek...@brainfinance.com <ek...@brainfinance.com> #65
Any updates guys?
di...@exploreshackle.com <di...@exploreshackle.com> #66
is...@gmail.com <is...@gmail.com> #67
er...@accor.com <er...@accor.com> #68
ko...@icoders.co <ko...@icoders.co> #69
android/app/src/main/res/values/styles.xml
<item name="android:windowSplashScreenBehavior">icon_preferred</item>
lb...@gmail.com <lb...@gmail.com> #70
The "android:windowSplashScreenBehavior" is marked to be only available from Android 13 (tiramisu).
Care to show a sample project to show that this workaround helps, and a video about it?
2 ways to reproduce it:
1. Install&run from Android Studio
2. Inside app-info: force-stop and open
ro...@gmail.com <ro...@gmail.com> #71
What version of splashScreen you use ?
I have the issue both on 12 and 13 android with
<item name="android:windowSplashScreenBehavior">icon_preferred</item>
ah...@6sensehq.com <ah...@6sensehq.com> #72
```kotlin
val intent = Intent(this, MainActivity::class.java).apply {
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP)
}
val pendingIntent = PendingIntent.getActivity(this, 0, intent,
PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT,
/* options = */
bundleOf("android.activity.splashScreenStyle" to 1) // Forces splash screen
)
```
### **Explanation:**
- **`FLAG_ACTIVITY_NEW_TASK`**: Ensures the activity starts fresh.
- **`FLAG_ACTIVITY_CLEAR_TOP`**: Prevents duplicate activity instances.
- **`PendingIntent.FLAG_IMMUTABLE`**: Required for Android 12+ security.
- **`PendingIntent.FLAG_UPDATE_CURRENT`**: Ensures updated extras are passed.
- **`"android.activity.splashScreenStyle" to 1`**: Forces the system to apply the splash screen when launching from a notification.
### **Dependency:**
Add the **Splash Screen API** dependency in your `build.gradle` file:
```gradle
// Splash screen API
implementation("androidx.core:core-splashscreen:1.2.0-alpha02")
```
### **Expected Behavior:**
✔ **Splash screen icon appears** even when the app is opened from an FCM notification.
✔ **No need for extra activities** or workarounds.
✔ **Compatible with Android 12 and later.**
Description
Version used: 1.0.0-alpha02
Devices/Android versions reproduced on: Pixel 5 on Emulator
While creating a new app, I decided to use the new Android 12 Splash Screen API and the core-splashscreen library that is in alpha currently to provide compatibility for older OS versions. In my testing, I found that when running the app on the emulator from Android Studio the splash screen icon is displayed for API 30, but not for API 31. You can see the attached videos showing the icon displaying for API 30 and not displaying for API 31. In the process of making my example project for this issue report, I did discover that the splash screen icon is displayed for both API 30 and API 31 if I launch the app from the app tray instead of launching it from the Android Studio runner, though. I have also attached a video showing that it works correctly when launching from the app tray. This allows me a way to test my splash screen, but it would be nice if it worked when launching via Android Studio as well since it didn't occur to me that it would work differently than launching from the app tray until I had investigated the issue for quite some time.