How to increase screen saver time in ionic iOS devices

I need to increase the time delay of the splash screen on ios devices. I am using IONIC.

Below is my configuration 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 works on an Android device, just setting up SplashScreenDelay. I do not know why the screen saver automatically hides after installing AutoHideSplashScreen.

+5
source share
3 answers

We can implement this by installing the splashscreen plugin plugin. For more reference http://learn.ionicframework.com/formulas/splash-screen/

 cordova plugin add org.apache.cordova.splashscreen app.run(function($cordovaSplashscreen) { setTimeout(function() { $cordovaSplashscreen.hide() }, 5000) }) 
+7
source

You can turn off the automatic processing of the screen saver and programmatically hide it when the application is ready.

Originally from the ionic graphics forum (with slight modifications):

Install the splashscreen plugin for cordons:

 cordova plugin add cordova-plugin-splashscreen 

Make sure the following is in the config.xml file of your project:

 <preference name="AutoHideSplashScreen" value="false" /> <preference name="ShowSplashScreenSpinner" value="false" /> 

In app.js, add the following to the run method:

 setTimeout(function() { navigator.splashscreen.hide(); }, 100); 

After adding, the code should look like this:

 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 }); }) 
+7
source
 platforms\android\cordova\default.xml 

You can add the default configuration needed for the config.xml file.

At run time, config.xml will be changed using the ionic structure, so you need to change the default value. xml will also be refelect in the config.xml file.

0
source

All Articles