Phonegap / Apache Cordova: stuck on device ready screen

I have a PhoneGap / Apache Cordova application, and I entered my own index.html page in the www folder, but when I launch the application, it does not go to the index.html page, instead it launches a splash screen with the message β€œdevice” done. " Where can I customize the launch page?

Index.html page:

<html> <head> <script src="jquery-2.1.1.js"></script> <link rel="stylesheet" href="jquery.mobile/jquery.mobile-1.4.4.min.css" /> <script src="jquery.mobile/jquery.mobile-1.4.4.min.js"></script> </head> <body> <div data-role="header" data-theme="b" class="ui-bar ui-bar-b"> <h1>Welcome to my app!</h1> </div> Username <input type="text" id="username" name="Username"></input><br> Password <input type="text" id="password" name="Password"></input> <button id="submit">Submit</button> <div data-role="footer" data-theme="b" class="ui-bar ui-bar-b"><h1>Placeholder</h1></div> </body> <style type="text/css"> body{ border:0; } </style> </html> 
+5
source share
3 answers

I think you are not editing the correct index.html file. If you are creating for android, then there is an index.html file located in the assets / www folder. This is the file you must edit to create the first screen of your Android application.

Note: the www folder will be hidden by default to make it visible goto Project -> Properties -> Resource -> Resource Filters in Eclipse and remove exception filters.

For more information check this out: http://codezag.com/apache-cordova-android-stuck-device-ready-screen/

+6
source

The config.xml file should contain an entry like <content src="index.html" />
The following is an example config.xml file. An entry in the config.xml file can be overwritten with your own html file name, which will be used as the launch html file.

EDIT1:
Unfortunately. I completely forget to see the question you edited.

You are missing an important entry in the index.html file.

You need to include the following in your head tag.

 <head> <!-- Cordova Script Tag over here --> <script type="text/javascript" src="cordova.js"></script> <!-- Jquery plugin over here --> </head> 

** Example config.xml below **

 <?xml version='1.0' encoding='utf-8'?> <widget id="com.company.appname" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <preference name="loglevel" value="DEBUG" /> <preference name="AndroidLaunchMode" value="singleTop" /> <feature name="App"> <param name="android-package" value="org.apache.cordova.App" /> </feature> <feature name="Device"> <param name="android-package" value="org.apache.cordova.device.Device" /> </feature> <name>appname</name> <description> A sample Apache Cordova application that responds to the deviceready event. </description> <author email=" dev@cordova.apache.org " href="http://cordova.io"> Apache Cordova Team </author> <content src="index.html" /> <access origin="*" /> </widget> 
+1
source

I am creating iOS. Similar problems. I'm a newbie, but I have had a corridor app on the App Store for at least 3 years, so I know this has changed. Now there is a WWW folder and a Staging / WWW folder, which later seems unimportant. And two files Config.xml. In addition, it is important to drag the insertion of HTML files / folders directly into Xcode, which helps to create the correct index ... They may be in the disk file structure, but still not visible in the Xcodes Tree / IDE thingy; that is, they will not be captured when you build and launch ... I believe that all this is confusing, but, as I said, I'm new.

0
source

Source: https://habr.com/ru/post/1202500/


All Articles