16 Jul 2013 9:38 AM #1
I'm trying to implement an auto update feature for my application running in a webview.
The server tells the app to update. So the next time the app launches, it will use a new app.js file from the server.
The thing is if somehow the app cannot download the new app.js from the server, i want to use the app.js file installed with the application.
I already implemented a fallback to use the app.js file installed with the application when I cannot download the new one. But the interface is just blank. I think what may happen is:
- The webview download the new app.js file, which fails
- The document fires domready event
- The webview loads the local app.js file (installed with the application)
Someone knows how to launch the app when the new app.js file loaded (onload...)
I already verify that Ext.setup function is run, but nothing happens.
18 Jul 2013 3:25 AM #2
- Join Date
- Mar 2007
- St. Louis, MO
- Vote Rating
You can manually execute the launch method in your app.js. You can set a flag on the namespace that it's executed, if not then fire the launch method. Kind of dirty but launch won't fire if you load it after the document is ready.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.