Currently, I am working on developing a Sencha-touch app that will be packaged with Phonegap. To simplify the development process, I am utilizing Phonegap as a shell to load my online website. This setup has been successful so far, eliminating the need to constantly build and distribute the app whenever changes are made. Instead, I can simply update the content on my online website.
However, I have now encountered an issue where I need to incorporate some PhoneGap events like 'resume' and 'deviceready'. To enable these events, I must include the cordova.js file in the index.html.
The challenge I face is that the index.html resides on my server rather than in the Phonegap www folder. When attempting to include cordova.js in the index.html using:
<script type="text/javascript" src="cordova.js"></script>
The application searches for cordova.js on my webserver and fails to locate the file. Although I could place the cordova.js file on my server, it varies for each platform, making it difficult to determine which platform-specific cordova file needs to be loaded.
Is there a method to include offline files (from the Phonegap www folder) in my externally loaded index.html document? Alternatively, do you have any other suggestions?
Thank you, Stefan