The following Phonegap project (Phonegap Build) is not working:
config.xml:
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashScreenDelay" value="10000"/>
<gap:plugin name="org.apache.cordova.splashscreen" />
Index:
<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>
The splash screen stays all the time and loads. The redirecting to the homepage is not working.
I tried this: PhoneGap Build iOS app has blank white screen after splash screen
this: http://community.phonegap.com/nitobi/topics/splash_screen_autohidesplashscreen_false_not_working_iphone_ios7 (Version 0.2.3 of Plugin)
Nothing is working. Any idea?
SplashScreenDelay (number, default to 3000). Amount of time in milliseconds to wait before automatically hide splash screen. <preference name="SplashScreenDelay" value="3000" /> This value used to be in seconds (but is now milliseconds) so values less than 30 will continue to be treated as seconds.
Removing plugins 'cordova plugin remove cordova-plugin-console' => Removes the console plugin from the project and deletes its entry from config. xml and package. json.
Cordova Android is an Android application library that allows for Cordova-based projects to be built for the Android Platform. Cordova based applications are, at the core, applications written with web technology: HTML, CSS and JavaScript.
The splashscreen plugin does not support AutoHideSplashScreen
for Android. See also this issue: https://issues.apache.org/jira/browse/CB-8396.
As for the redirect not working, try window.location.href = 'http://www.example.com/login';
Fast forward to 2016: This was just recently implemented. You need [email protected]
(released Feb 2016)
See https://github.com/apache/cordova-plugin-splashscreen/pull/74
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With