I need to increase time delay of splash screen in ios devices. I'm using IONIC.
Following is my config file:
<feature name="SplashScreen">
<param name="ios-package" value="CDVSplashScreen"/>
<param name="onload" value="true" />
</feature>
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="orientation" value="portrait"/>
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="8000"/>
<preference name="AutoHideSplashScreen" value="false"/>
<preference name="auto-hide-splash-screen" value="false" />
It's working in Android device by simply adjusting SplashScreenDelay. I don't know why splash screen is hiding automatically after setting AutoHideSplashScreen is false.
Time interval settings The splash screen will be displayed for a specific time period and will then be closed. By default, the value will be set as 5000. User can change this value, run the application and see the difference. The time interval for which the splash screen is to be displayed (in milliseconds).
Open android studio and locate the drawable files. In android studio, open resource folder in app -> res . Right click the drawable folder, then click Show in Explorer . Change all images in the drawable folders using your new splash screen.
You can disable the automatic handling of splash screen and programmatically hide it when the app is ready.
Originally from ionicframework forum (with slight changes):
Install the cordova splashscreen plugin:
cordova plugin add cordova-plugin-splashscreen
Make sure you have the following in config.xml of your project:
<preference name="AutoHideSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />
In app.js, add the following in the run
method:
setTimeout(function() {
navigator.splashscreen.hide();
}, 100);
After adding, the code should look as follows:
angular.module('app', ['ionic', 'app.controllers', 'app.routes', 'app.services', 'app.directives'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide splash screen
setTimeout(function() {
navigator.splashscreen.hide();
}, 100);
// some other things
});
})
We can implement this by installing cordova splashscreen plugin .For more refer link http://learn.ionicframework.com/formulas/splash-screen/
cordova plugin add org.apache.cordova.splashscreen
app.run(function($cordovaSplashscreen) {
setTimeout(function() {
$cordovaSplashscreen.hide()
}, 5000)
})
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