Add the Splash startup page to your Cordova HybridApp, cordovahybridapp
Currently, the latest Cordova 3 or later versions support the startup screen, which is implemented through the cordova plug-in.
Currently, the Splash plug-in supports android, ios, blackberry, and other platforms.
The process of adding a plug-in is as follows:
Add the SplashScreen plug-in
Run the following command in the cordova project directory:
cordova plugin add org.apache.cordova.splashscreen
This command downloads the plug-in code from the plug-in git Library to the plugins directory of the project.
Modify the config. xml configuration file
<Preference name = "SplashScreen" value = "screen"/> <! -- The file name without the suffix png. The default value is screen --> <preference name = "SplashScreenDelay" value = "3000"/> <! -- Display time of Splash. The default value is 3000 ms. --> <feature name = "SplashScreen"> <param name = "android-package" value = "org. apache. cordova. splashscreen. splashScreen "/> </feature>
You can see that the name of the startup image is screen.png. Some default screen.png images are displayed under the project. The cordova logo is displayed. You need to replace these images with your own startup image. You can simply delete the unsupported size image.
Hide the Splash screen after device Initialization is complete
document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { navigator.splashscreen.hide(); }
If the ionic framework is used, add it directly to the. run (['$ ionicPlatform', function ($ ionicPlatform) {...} of the app. js file.
navigator.splashscreen.hide();
You can.
Run your App now and you will see the startup screen.
The cordova folder generated by sencha app build native is incomplete.
Have you referenced the cordova project first?
After creating a project with sencha, switch to the generated project folder and run sencha cordova init com. youname. appname reference.