禁用Android的AutoHideSplashScreen不工作
以下Phonegap项目(Phonegap生成)不工作: config.xml:禁用Android的AutoHideSplashScreen不工作,android,cordova,Android,Cordova,以下Phonegap项目(Phonegap生成)不工作: config.xml: <preference name="AutoHideSplashScreen" value="false" /> <preference name="SplashScreenDelay" value="10000"/> <gap:plugin name="org.apache.cordova.splashscreen" /> 索引: <head> <scr
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashScreenDelay" value="10000"/>
<gap:plugin name="org.apache.cordova.splashscreen" />
索引:
<head>
<script type="text/javascript" charset="utf-8">
window.location = 'http://www.example.com/login';
document.AddEventListener("deviceready", OnDeviceReady, false);
function OnDeviceReady() {
setTimeout(function() {
navigator.splashscreen.hide();
}, 6000);
};
</script>
</head>
window.location=http://www.example.com/login';
文件。添加的监听器(“deviceready”,OnDeviceraddy,false);
函数ondevicerady(){
setTimeout(函数(){
navigator.splashscreen.hide();
}, 6000);
};
启动屏幕始终保持并加载。重定向到主页不起作用
我试过这个:
这:
(插件的0.2.3版)
什么都没用。有什么想法吗?splashscreen插件不支持Android的AutoHideSplashScreen。另请参见此问题:
如果重定向不起作用,请尝试
window.location.href=http://www.example.com/login';
如果您想禁用splashscreen,您应该在《快进到2016年》的正文中添加onDeviceReady
:这是最近才实施的。你需要cordova插件-splashscreen@3.2.0
(2016年2月发布)
请参见虽然此链接可以回答问题,但最好在此处包含答案的基本部分,并提供链接以供参考。如果链接页面发生更改,仅链接的答案可能无效。-@LawrenceAiello这不是唯一的答案。example.com不是一个真正的站点。它现在受到v3.2.0的支持