Hi all
scenario:
last year I've developed a web app for android devices that should work off-line.
The app serves as front-end of the main app running on the main web server.
When on-line, the app should receive from the main web server the data about specific tasks that should be done off-line.
When again on-line, the app should return to the main web server the new data of the completed tasks.
In order to work off-line the app stores data in the internal storage of the browser (local-storage or indexedDB).
The application is cached in the Application Cache of the browser (according to the supplied manifest file).
I've not developed a native app for several reason, that cannot be overcame.
new scenario:
the now mandatory use of https does create problems with AppCache; furthermore, the use of the browser internal store seems too limiting and the browser sandbox in general doesn't allow complete operational freedom.
I'm thinking about a solution based on having a web server running locally (on the android device). The web app could talk with a simple server app in order to store and retrieve data in a relational db, and also to carry out other operations such as documents generation and likes.
questions:
what do you think about this, guys?
do you have any hints?
do you know any product (free) that may be used?
maybe a NodeJS running on Android?
I would warmly thank you in advance, guys.
last but not least: please excuse my poor and bad english :(
Personally I find that the in browser storage is really adequate for just about anything. Local and Session is what I use most and being key->value stores, you can do much with it.
I did build a solution based on storing "tasks" locally when offline, and when the browser goes online, would run through those task sending them to the main server.
These days I've become spoilt with using Firebase's Firestore NoSQL backend as it handles all the offline support right out of the box, nothing extra to be done by you. It just works. (Free for small projects)
You could also look at some abstraction packages for the browser localstores, something like LocalForage comes to mind. It handles json and also blobs amongst other types.