In previous versions of Capacitor, the splash screen on Android was an image that was specified in splash.png. I have recently upgraded to Capacitor 4 and changed the target SDK version to 32. From what I have read, the Android 12 Splash screen API now uses your App Icon as a splash screen, and you may customize the background color, animations, etc.
Is there any way to use the old behavior, I.e. Show a custom image as a splash screen?
Please note I am not an android developer and have only used Ionic/Capacitor to create apps, thanks.
Update: I don't think this is currently possible. See:
Android 12 custom splash screen with background image
Android 12 Splash Screen API customization
Related
I'm using ionic, capacitor and android to test and make an application.
I've generate splash and icon image with the command:
ionic cordova resources android
I build the project npm run build
I launch the project on android studio npx cap open android
When i launch the application the splash screen displays well on the emulator of Android Studio. But when i launch on my phone the image selected for the splash is not the good it is using like a icon image for the splash screen.
I'm using the last version for all the lib (i've started a project and i'm new in this field)
I had the same problem.
The created Splash Images are stored in the android project: android/app/res/drawable/splash
Check the images in there. In my case, there were somehow images for dark-mode created, that just have the app icon on a black background.
As my emulator was in light mode it showed the correct image, but on my real device I use the dark mode and so it had used the wrong image.
I just deleted those dark-mode images, so it always takes the light-mode images.
You have to add splash-night to your resources folder, as per official assets documentation: https://www.npmjs.com/package/#capacitor/assets
I have a question regarding the new splash screen migration with Android 12. I went through the migration, all phones that are not running Android 12 now have the default Droid as the splash screen popup. I am curious how can I either have my legacy splash screen or replace the droid image for the phones that are not running Android 12.
Here is the GitHub for the Xamarin.Android Splash Screen Migration
https://github.com/xamarin/xamarin-android/issues/6517
Also here is the link to the Android Migration
https://developer.android.com/guide/topics/ui/splash-screen/migrate
I can't find anything in the documentation about phones that are not running Android 12 and how to give the user something other than the Droid as a splash screen.
I've added an icon to my app via the built-in Image Asset Studio in Android Studio.
Made a png foreground and then color as a background.
On a Samsung device, the icon renders perfectly.
Then when I install the app on a Huawei P20 with android 10. The icon is rendered like this:
I think the Huawei UI isn't using the adaptive icon, but uses the legacy icon and adjusts it into its custom app shape UI and therefore zooms in.
Are there some extra steps I need to do for having a good rendering app icon?
Thanks.
Have you tried Adaptive Icons?
Instead of using a single image use the combination of 2 images for Foreground and background.
You can take the idea from android's default app icon, it's also adaptive.
I had the same problem with Huawei P20 Lite (Android 8.0.0) when I tried to install an app from Android studio.
There's nothing we can do to fix it.
But the icon will look like it should after a reboot.
Also, if you'll build a release version of your app and install it via adb install the icon will look like you expect.
When Android 3.6 released it came out with a big feature, the Multi-display support display dimensions from the Emulator
https://developer.android.com/studio/releases/#multi-display_support
But in my emulator, I cant find that option, I have updated all and nothing
The multi display settings menu is displayed only if you are running the Android 10 image API level 29.
My app has a square icon. When targetSdkVersion < 26 the app icon is shown correctly on all devices. But with targetSdkVersion >= 26 the app icon is shown inside a white circle on Android 8.0 devices.
Is there a way to remove the white circle?
Per the Understanding Android Adaptive Icons blog post:
Indeed Google’s launcher will start placing icons of apps which target Android-O but do not supply an adaptive icon onto a background (scaling down their non-adaptive icon).
You must add an adaptive icon to your app once you target API 26. As adaptive icons change their outer shape based on what device they are running on, you cannot rely on your launcher icon always being a square.
The Designing Adaptive Icons blog post and Implementing Adaptive Icons blog post goes through more details on how you might take advantage of adaptive icon's separate background and foreground layers and how to implement an adaptive icon in your app. Android Studio also contains tooling to help via the New > Image Asset wizard as described in the Create app icons with Image Asset Studio article.