Javascript 如何告诉Cordova不要自动隐藏启动屏幕?
我的config.xml中有以下内容Javascript 如何告诉Cordova不要自动隐藏启动屏幕?,javascript,cordova,Javascript,Cordova,我的config.xml中有以下内容 <feature name="SplashScreen"> <param name="ios-package" value="CDVSplashScreen"/> <param name="onload" value="true" /> </feature> <preference name="auto-hide-splash-screen" value="false"
<feature name="SplashScreen">
<param name="ios-package" value="CDVSplashScreen"/>
<param name="onload" value="true" />
</feature>
<preference name="auto-hide-splash-screen" value="false" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SpalshScreenDelay" value="60000" />
<gap:splash src="res/screen/ios/screen-iphone-portrait.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="res/screen/ios/screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960" />
<gap:splash src="res/screen/ios/screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136" />
<gap:splash src="res/screen/ios/screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024" />
<gap:splash src="res/screen/ios/screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768" />
<gap:plugin name="org.apache.cordova.splashscreen" />
当我在设备上打开应用程序时,我会看到启动屏幕。。。但它会自动关闭,我不会调用任何javascript来关闭它。它应该说,永远
这是我在设备日志中看到的:
Jul 15 17:04:41 iPad-5 TRAF[2615] <Warning>: Multi-tasking -> Device: YES, App: YES
Jul 15 17:04:41 iPad-5 TRAF[2615] <Warning>: Unlimited access to network resources
Jul 15 17:04:41 iPad-5 TRAF[2615] <Warning>: Fix applied for database locations?: YES
Jul 15 17:04:41 iPad-5 TRAF[2615] <Warning>: [CDVTimer][file] 5.380988ms
Jul 15 17:04:41 iPad-5 TRAF[2615] <Warning>: [CDVTimer][splashscreen] 27.823985ms
Jul 15 17:04:41 iPad-5 TRAF[2615] <Warning>: [CDVTimer][TotalPluginStartup] 37.027001ms
Jul 15 17:04:41 iPad-5 TRAF[2615] <Warning>: Resetting plugins due to page load.
Jul 15 17:04:43 iPad-5 TRAF[2615] <Warning>: Finished load of: file:///var/mobile/Applications/662EC33F-CC74-42C4-83F0-4D4EC759EF80/TRAF.app/www/index.html#/
Jul 15 17:04:41 iPad-5 TRAF[2615]:多任务->设备:是,应用程序:是
7月15日17:04:41 iPad-5 TRAF[2615]:无限制访问网络资源
7月15日17:04:41 iPad-5 TRAF[2615]:对数据库位置应用了修复程序?:是
7月15日17:04:41 iPad-5 TRAF[2615]:[CDVTimer][file]5.380988ms
7月15日17:04:41 iPad-5 TRAF[2615]:[CDVTimer][splashscreen]27.823985ms
7月15日17:04:41 iPad-5流量[2615]:[CDVTimer][TotalPluginStartup]37.027001ms
7月15日17:04:41 iPad-5 TRAF[2615]:由于页面加载而重置插件。
7月15日17:04:43 iPad-5 TRAF[2615]:完成装载:file:///var/mobile/Applications/662EC33F-CC74-42C4-83F0-4D4EC759EF80/TRAF.app/www/index.html#/
我不希望启动屏幕关闭,除非我告诉它。因此,我阅读config.xml的方式应该是可行的,但是。。。娜达
有什么想法吗?你添加了SplashScreen插件吗?还是在Android上这么做?@AsankaIndrajith-org.apache.cordova.SplashScreen在上面列出的config.xml中。目前这是在iOS上实现的,但也需要在Android上实现。