Android 12 Splash Screen Migration Help

Seth Isaacks 11 Reputation points
2022-03-31T17:32:41.067+00:00

My Xamarin app is about two years in the making. Android 12 introduced a new splash screen. I have been designing my app in Windows Visual Studio.
I have read through a few links about how to migrate the splash screen but it involves using Android Studio, which I am not using to develop in.
So I am wondering if anyone can give me some guidance on how to keep my original splash screen versus the new Android 12 or if that is even possible.
Right now the splash screen shows my App Icon with a white background.

I found the following https://github.com/xamarin/xamarin-android/issues/6517
but I am unsure of how to do the work arounds they speak of.
For example one guy states the following:

Download https://dl.google.com/android/maven2/androidx/core/core-splashscreen/1.0.0-alpha02/core-splashscreen-1.0.0-alpha02.aar
Create a new Android Bindings Project
Add core-splashscreen-1.0.0-alpha02.aar to the Bindings Project
(Optional?) set the $(TargetFrameworkVersion) of the Binding Project to v12.0

But I am not of the process to do those steps.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,377 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Graham McKechnie 441 Reputation points
    2022-10-15T23:25:13.777+00:00

    @Le Trung Thong (DPS.FMS)

    The following link shows how to convert a Xamarin.Android app to use Xamarin.AndroidX.Core.SplashScreen using the standard Xamarin Application icon. Just replace the app icons with your own app icons.

    https://github.com/gmck/XamarinBasicSplashScreen

    0 comments No comments

  2. Alessandro Dutenhefner 1 Reputation point
    2022-12-20T15:32:37.833+00:00

    Doesnt work on my device.
    Samsung Galaxy note 10 lite (android 12)
    Splash screen is white, no logo.

    0 comments No comments

  3. Graham McKechnie 441 Reputation points
    2022-12-20T19:15:31.26+00:00

    @Alessandro Dutenhefner

    I've just re-tested the XamarinBasicSplashScreen app on 3 Samsung devices - Galaxy S20 5G Android 12, Galaxy S8 Android 12 and Galaxy Tab S7 Android 13. They all display the Xamarin.Android application icon. I've got no idea why your Galaxy Note 10 Lite will not display the same application icon.

    A couple of questions though.

    Do you do a cold start each time you launch the app? Please note, you will not see the icon on a warm start.
    Are you building it as you downloaded it without any changes?
    Have you modified it with your own icons?

    You could try to uncomment the line System.Threading.Thread.Sleep(1000); in the MainActivity to introduce an artificial delay.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.