Storing Files locally on Mobile Device using a Webapp - android

I need to create an application that does the following:
Is available for Android and iOS devices primarily, Windows phone support would be nice
Allows the user to use the app offline
Allows the user to download files (PNGs and HTMLs) from a webserver to be displayed later within the webapp (needs to be able to be viewed offline)
Doesn't require user to redownload all the PNGs and HTMLs if they clear their browser cache (would be nice if there was a way to keep them from clearing the web app cache too, but I understand if this is not possible)
What tools do I use for this? So far, I'm at HTML5 web app and I understand how to cache the site, but how do I get the files (PNGs and HTMLs) to be saved locally and not subject to being cleared should the user clear the browser cache? Is native for iOS, Android, and Windows the only way to go here?
Any help is appreciated...

If you want your app to work on multiple platforms and be available offline, your best bet would be to wrap your app in something like PhoneGap and package it up for the various platforms.
This allows for one common "HTML-based web app" code base but will require compiling for the different platforms respectively.

Related

Load hybrid iOS and Android mobile app from server

I am using Ionic and Cordova to build a mobile app which will go on the iOS and Android stores. I have done this many times, and I really hate the process of having to update the app (specifically with Apple).
Would it be safe to dynamically load all of my templates and controllers from my server when the app loads, potentially caching them or having a server call to check if there is a new version? Basically, I would have all images and styles saved locally to the phone, but load the templates and controller code on app load.
And, if it was ok to do programmatically, are there any rules against this in Apple or Android's terms of use?
This is possible and there are tools like Cordova Hot Code Push to help you accomplish it. As long as you don't use this to break other app store review rules or significantly change the purpose of your app it's fine with Apple.

Can I make an android app using html that recieves and stores values entered by the user?

Basically, I'm trying to make use of this website called PhoneGap that recives html codes and converts them into mobile applications.
So I'm trying to make an application that tells you how much money you owe people and how much money people owe you.
IS this possible?
HTML alone isn't enough to develop your application. It's a simple mark-up language and unable to create any real functionality. But HTML if used together with javascript (which adds the required functionality) will work great for building what you mentioned.
So if, for any reason, you'd prefer to not develop a standard native application (one which is installed locally on a user's device), then another option is to build a web-based application. These have much in common with typical websites (though optimized for mobile devices) and are generally easier to build. Another advantage is that they can run on almost any device that has a browser installed, and therefore not tied to any one specific OS, such as Android. Web applications - despite not being installed on the user device - can none the less make use of local storage to save data. This is one example for when javascript is needed.
Here is a great resource for learning about javascript: http://www.w3schools.com/js/
You should read about HTML5 and hybrid apps. A hybrid app is what you are after.
Yes, you can use html to build an app with Phonegap, but you'll need JavaScript too.
I suggest the following technologies for you: Ionic, Angularjs and localStorage for recording the data.

Suggestion: Native or Web App depending upon my idea?

What I want to develop: Crude Overview?
Suppose 10 web links present on my (native/web) app, and user will scroll through links. And when user clicks on any of the link, it will open that website. And user might wish to close this website and again views the list of those URLs on my app and the cycle may go on as per his wish. Also, user can create custom list of those links. Also, these lists will be updated regularly, may be on monthly basis. Which I guess I just need to update data files and not app.
No, it is not similar to browser bookmarks but in very crude terms you can relate it. Anyways, I will accessing user's bookmarks with his permission which I guess can be easily done with the APIs available.
Right now, technologies in my mind.
1) Phonegap ( to be precise, its phonegap build - as I don't have MAC) with JQuery mobile and deploy as native app,or
2) SenchaTouch and deploy as web app or native app using sencha cmd.
3) I want to use MongoDB along with above 1st or 2nd option. Is it required or JSON can suffice? Also, I may need some security by encrypting this data while storage at user's mobile and also while collecting user's custom lists.
4) In future, I would also need Node.js for the purpose of collecting MongoDB or JSON data files in above 3rd point. Is there any other way so that it can be integrated with phonegap or senchaTouch.
Please suggest things if existing resources can help me develop my idea and guide me what to use!
Note: All technologies I am picking up are focused on single code base with minimal focus on platform specific changes-iOS/android/Windows/Blackberry.
I want to go for Native app rather than web app. Why?
1) I feel that it would perform faster if I deploy my idea as android/iOS/Windows app rather than web application.
2) My cost of hosting the application on server will go to null because I am using local storage of the user's mobile.
3) Since I want a feature in my app which stores user custom settings so it would be better if I deploy it as mobile app rather than web app so that I don't have to maintain user specific settings which may make my DataBase hosted on server to grow immense in future.
4) Also,I feel that there is no sense in hosting this application on a dedicated server because there would be less user interaction with my backend. But later I would plan a feature to collect data/settings done by user to improve feed for which I think I need to use Node.js. But then also there is no requirement of hosting frontend to a dedicated server. Hence, I can use dedicated server to serve my own purpose of analytics to improve feed rather than service user's purpose of unnecessary access to my web application always through the server and fetching lists of links which are maintained on server in custom manner for him.
My dilemma!
My above points are valid to prefer deploying as native app over rather than web app. But I feel what if I keep my app as offline web app which runs on the default browser of the user but loads the jquery and other data and scripts from the storage in mobile. Is this possible? I am unaware of this.
If this is available then it is the best thing for me to adopt as my application redirects to other websites. Because, if I am deploying my app as native app then it would ruin user experience of opening my app and selecting an option whose URL opens up in default user's mobile browser which is a different app and then there are many chances that user will switch back to my app and then again he would be redirected to that mobile browser. And obviously I cannot develop my own browser in my app as I would have to develop several things from security and other perspective which would be a cumbersome task. So, having my offline web app will be opened in user's default browser itself without annoying him to switch back and forth between my app and browser as in previous case and thus creating seamless experience.
Also, I am not sure whether we can create offline inbuilt browser plugins as we can do in chrome browser on desktop. If so, then I think I would have to concentrate differently on different mobile browsers Safari, Chrome, mozilla which I feel is not worthy. Please throw some light on this for me.
I have no idea why people are downvoting my question as I feel that it is kind of unique question.
Here is what I found more and with the help of my friend
1) I don't have to use MongoDB as my application is not much complex. So simple JSON will suffice.
2) I'll be using Phonegap for android and windows phone and phonegap build for iOS along with jQMobile. So the app will be in the native form only.
3) I'll be using inApp browser for seamless experience although it is not as perfect as having my idea as web app.
4) No need for senchaTouch as it is heavier than phonegap and not required for me idea.
5) My next look forward is comparing the above points with offline web app built using JQMobile and JSON and finally whatever I decide I will share.
EDIT:
I am finally going with phonegap for native deploy rather than offline web app or web app hosted on server for reasons that I found on several blogs.
People downvoted my ques so I feel that it is not worth writing answer further but if you want the detailed reason you can always add a comment.
Thank you
You should definitely go for web. It is cross platform. If you do an android App, or iOS App, they are restricted to the specific devices. So I definitely recommend Web App

How does a web application work as mobile application?

This maybe a basic question, but I really wanted to ask it.
Consider a web application which is deployed on a cloud server and I want it to be available offline on a mobile(android device). Is it possible? Or will there be a separate installation on every mobile? How does phone gap or cordova help achieve it?
Yes it is possible. Cordova is an android application that has a webview (like a browser) for you to display an html app which is normally build with html+javascript. But cordova/phonegap applications should be made simpler than usual web application since smartphones has limited resources, unlike normal servers. There will be separate installation per mobile.
Phone Gap, Cordova etc. build native application, each user must install it to work offline. You can also build such native application manually by yourself with WebView. It can be easy to build but may require to changes in business logic to separate handle offline case, like store data locally and then sync when go online - this depend of application.

Best way to deliver a website to view offline on an Android tablet

looking for some advice on what is the best way to deliver an HTML/CSS based website for use on Android tablets offline.
Having researched the topic on here for a while and looking into different development techniques there seems to be two outright 'winners' as such for delivering such a project.
Firstly, is to build the website normally and then save it to an SD Card to run in the Android browser, secondly is to use Adobe Air and run as an Android app but what I'd also like to know is whether if it is possible to browse the website online and have it cache on to the device so that when it loses an internet connection the full website will still run as normal.
A bit more info on the website, it will be built completely in HTML/CSS with responsive templates so that resolutions aren't an issue and it is a 'brochure' website so the content won't need updated at any point.
Any help on the issue is much appreciated as developing Android apps or running websites from an SD Card is something I've not had the pleasure of doing before.
Many thanks
PhoneGap is an HTML5 app platform that allows you to author native
applications with web technologies and get access to APIs and app
stores.
Say goodbye to SDKs, compilers and hardware. Simply write your app
using HTML, CSS or JavaScript, upload it to the PhoneGap Build service
and get back app-store ready apps for Apple iOS, Google Android, Palm,
Symbian, BlackBerry and more.
By compiling in the cloud with PhoneGap Build, you get all the
benefits of cross-platform development but can still build apps just
the way you like.
You can use PhoneGap and even Build PhoneGap (online version) - just upload your entire HTML5 app as a ZIP folder (local paths like /assets/ and not D:/images/) - just the full app code and zip it - then use PhoneGap - it will convert it and give you the App code file - visit Android marketplace as well as others such as Apple and upload.
done.

Categories

Resources