How to autocomplete a Phonegap application

I want to get rid of updates through Google Play and AppStore. Instead, I want my app to be automatically selected by mobile clients.

Does anyone know a way to do this?

+4
source share
2 answers

You may need to make some kind of bootstrap code that will not be available for updating without AppStore / Play, but this part will extract any html / js / css / ... files using FileTransfer.download () to your folder cache, and then include them in the main html, which would otherwise be empty. eg:

<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>My App</title> <script type="text/javascript" href="js/bootstrap.js"></script> </head> <body> </body> </html> 

And now in your bootstrap.js use requestFileSystem and co. to access the cache folder where you will download any additional materials you want to execute, and then add them to html and execute, perhaps something like https://github.com/mmarcon/jquery-on-demand Adding content to html for loading from your local cache is simple, just say the file: // + full_path_to_your_file when adding src content or just load it and .append () into html. It basically looks like code self-updating.

Now there is another story that will be approved by the AppStore and co that you update the application without their approval ... This is normal for the content, but not necessary for the code, but on the other hand, it is not native code, just js, so I I believe this may be good, but more research is required.

+1
source

Cordoba-autonomous hydration does just that, you can find it here:

https://github.com/torrmal/cordova-standalone-hydration

Hope this helps, if you have any questions, feel free to let me know, I will be happy to help.

0
source

All Articles