1 Reply Latest reply on Jan 24, 2018 2:39 PM by ralphs26798824

    Use AWS a store for HTML and images / download and use in app?

    RevolverRelayer Level 1

      I am trying to build a Phonegap app (Android and iOS) to distribute amongst a user-base.


      Although the app's functionality will rarely change, its content (it is a knowledge base type app) will need to be updated regularly. It's not practical to have the users re-install each time we change the content, so ideally we should be able to update content separately.


      I have been testing Microsoft Codepush which looked to be the perfect solution, however, I can't seem to get it to work reliably, (it randomly rolls back the content to the last time the app was installed and ignores any further updates).


      My other thought was whether we could use AWS to store the content (again, HTML and images) and use the AWS API to check for new content each time the app loads, and download it if so, and using it as the app's content.


      Before I spend ages on this, does anyone know if this is possible, or practical?


      Or is there a better solution?



        • 1. Re: Use AWS a store for HTML and images / download and use in app?
          ralphs26798824 Level 1

          Yes, it is entirely possible. You would could deploy the application with a definition and the app could check with the server for updates. If using JS, as the www folder is readonly, would you need to unzip / build the application into available persistent storage and then launch your application / link to it from there. This is often the type of approach the codepush / hotpush plugins use which some people have great success with - we ended up writing our own for our purposes.


          Alternatively as it is a knowledge based application, rather than serving static HTML pages you could serve content through an API, I.e. you write a server & client routine where the client says 'I have articles X, Y and Z' and the server then sends back what is missing, changed or been deleted. The client the saves this data available locally offline for the user. This could would then work much better with a database built into the application.


          Another option that springs to mind is using the HTML5 Application Cache. Whilst this is deprecated I believe it is still working on iOS and Android and might be a quick way to achieve what you are after - albeit not a long-term solution. The Application Cache stores the files locally and automatically checks for and downloads updates.


          There are lots of options and it is a matter of picking the best for the project, the budget and the skills you have available! If you do not have the time to write your own, I'd stick with the existing codepush plugin, report the fault and wait for an update.


          Good luck.