Cordova airwatch-sdk-plugin的自定义启动初始屏幕

问题描述 投票:0回答:1

我开发了Cordova应用程序,其中集成了airwatch-sdk-plugin。如官方文档所述,此插件会自动启动,分别显示以下两个徽标(分别适用于Android和iOS)。

Android

iOS

如何为初始屏幕设置自定义徽标?除此行外,我在文档中找不到任何内容:

在设备上启动SDK应用程序时,VMware AirWatch初始屏幕的品牌名称

所以我知道它是可行,但没有说明如何执行]

cordova cordova-plugins vmware airwatch airwatchsdk
1个回答
0
投票

我自己找到了解决方案,我正在发布它,因为它可能对其他人有帮助。仅适用于Android,我还没有尝试过iOS / iPadOS。

Android

  • [在Android Studio中创建新的图像资产(File > New > Image Asset);
  • 将刚创建的资产文件夹复制到您的cordova项目中的某个位置;
  • 在config.xml文件中,使用resource-file标记将资产复制到特定的Android项目文件夹中(请参阅Cordova文档)。例如:
<resource-file src="cordova_app/icons/android/mipmap-xxxhdpi/company_logo.png" target="android_app/src/main/res/mipmap-xxxhdpi/company_logo.png" />
  • 在您的Cordova项目中创建一个名为styles.xml的文件,并且像上一点一样,使用resource-file标签将此文件复制到'src / main / res / values'文件夹中;XML文件应如下所示:
<?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>
  • 启动sencha app build android命令以检查结果
© www.soinside.com 2019 - 2024. All rights reserved.