How to create a custom updater for phonegap

240 views Asked by At

I'm working on an application which is changing daily and ran through adobe build using phonegap. At the moment I am using hydrate to update it but their are a number of criteria which it does not satisfy.

Does anyone know of any way I can create my own updater which can update any of the app files (including the index.html) by checking my server for update. I thought about using the file manager API but upon reading other posts it appears it can't edit any of the app files.

Does anyone know any methods to overcome this or have any comment/thoughts on security and best practices?

1

There are 1 answers

0
Vikram On

If you are talking of an android app:

To auto update apps, you cannot access individual files such as index.html or any other files within your app.

You could instead approach it as if it is a normal apk which needs to auto update. https://stackoverflow.com/a/15932364/2715337

But as you mentioned that the update happens on a daily basis, the best way would be to let the entire index.html load from the internet and keep other files (jquery, etc) which need not be updated within the app.