確保您已爲您的應用程序選擇了適當的插件。不要使用此功能的Intel XDK版本(基本插件),它已被棄用。改爲使用Cordova版本(閃屏插件)。
此功能可以由科爾多瓦或XDK功能工作:
app.hideSplashScreen = function() {
"use strict" ;
// see https://github.com/01org/appframework/blob/master/documentation/detail/%24.ui.launch.md
// Do the following if you disabled App Framework autolaunch (in index.html, for example)
// $.ui.launch() ;
if(navigator.splashscreen && navigator.splashscreen.hide) { // Cordova API detected
navigator.splashscreen.hide() ;
}
if(window.intel && intel.xdk && intel.xdk.device) { // Intel XDK device API detected, but...
if(intel.xdk.device.hideSplashScreen) // ...hideSplashScreen() is inside the base plugin
intel.xdk.device.hideSplashScreen() ;
}
} ;
它是由一個類似命名的功能在這個XDK模板>https://github.com/gomobile/template-blank-cordova-project
得到的
init-app.js
文件中