Custom startup splash screen for Cordova airwatch-sdk-plugin

205 views Asked by At

I developed a Cordova application in which I integrated the airwatch-sdk-plugin.
This plugin starts automatically, as stated in the official documentation, showing the following two logos respectively for Android and iOS.

Android

iOS

How can I set a custom logo for the splash screen?

I couldn't find anything in the documentation, apart from this line:

Branding of VMware AirWatch splash screens when SDK application is launched on device

so I know it's feasible, but it's not explained how to do it

1

There are 1 answers

0
ApocalypseMike On

I found the solution myself, I'm posting it because it may be helpful for someone else.
For Android only, I didn't try for iOS/iPadOS yet.

Android

  • In Android Studio create a new Image Asset (File > New > Image Asset);
  • copy the just created asset folders somewhere in your cordova project;
  • in config.xml file use resource-file tag to copy the assets in the specific Android project folder (see Cordova documentation). For example:
<resource-file src="cordova_app/icons/android/mipmap-xxxhdpi/company_logo.png" target="android_app/src/main/res/mipmap-xxxhdpi/company_logo.png" />
  • create a file named styles.xmlin your Cordova project and like the previous point copy this file in 'src/main/res/values' folder using resource-file tag; The XML file should be something like this:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="SDKBaseTheme" parent="Theme.AppCompat.Light">
        <item name="awsdkSplashBrandingIcon">@mipmap/company_logo</item>
        <item name="awsdkLoginBrandingIcon">@mipmap/company_logo</item>
        <item name="awsdkApplicationColorPrimary">@color/color_awsdk_login_primary</item>
    </style>
</resources>
  • launch the sencha app build android command to check the result