Is it possible to develop pure HTML5 applications with PhoneGap? - android

Even after searching PhoneGap's website and their support group, I still cannot find an answer to my question:
Currently, I'm planning on developing an application that should exists as a pure HTML5 application, being able to run in any modern browser (Google Chrome, Safari, etc.) as well as on Android/iPad as native mobile applications.
So my question is:
Is it possible to use the same code base to develop both pure HTML5 applications as well as native mobile applications with PhoneGap?

PhoneGap is in effect a runtime environment for HTML, javascript, and any CSS that may accompany your code. So in short:
Yes, but it is recommended that you have some knowledge of Objective-C if you want to develop any iPhone app with extended functionality. If you have the right dimensions/proportions for the code there is no reason why you cannot simply copy that code into PhoneGap and compile it.

See, the support for #HTML5 varies from browser to browser, and varies a lot from a desktop browser to mobile browser. If one has to convert web-portal to a mobile application that can easily be done through Phonegap, you can refer to this link also. https://build.phonegap.com/ It worked fine for me.
Now lets come to Phonegap, what phonegap does is it has created wrapper through javascript that calls the native apis. Now to show content they use WebView object which renders your html5 page in your app. And you can create your own wrappers too. Not that much difficult.
So if your app is only a web based portal, that does not need much native access, you can easily reuse one codebase make #cross-platform apps using Phonegap. Else you need to go for hybrid apps.

Related

Using HTML to build phone application

I have tried some App Builder to build the mobile application such as Seattle Cloud, now I want try to build an android application without using the App Builder, but I figured out the page's extension is .HTML in the App Builder, but when I using Android Studio to build the app, the layout is using XML. I have experience to develop web application using PHP and now I want try to build an Android Application to view information from my web application, I feel confused, How should I start?
You can use Phonegap for hybrid app development using web technologies such as CSS, HTML, JavaScript and jQuery.
Other similar options available are Titanium SDK and Sencha Touch, but you will take time to get well with them. They are better than Phonegap in some areas, also device api support is available.
Whatever framework you use to build hybrid apps, you will have their respective js files and css to achieve functions. Some combine with PhoneGap in the end to use device api's, so it is better to go with PhoneGap or something like Titanium or Sencha. You may also have a look at Ionic framework, it uses AngularJS, HTML and CSS.
Use WebView. It's a view that displays web pages. You can use local html files as well as a URL. For more information:
http://developer.android.com/guide/webapps/webview.html
Android works in a very different compared to web apps. the design of the application is done in XML which will create native UI components and will be much faster the HTML counterparts.
There are different frameworks for developing an android app based on HTML/JavaScript
Sencha touch
Phonegap
Appcelerator Titanium (Although this may not be a pure HTML framework)
see: How to create an android app using HTML 5
But compared to apps based on HTML frameworks, native apps will be faster, consumes lower memory.
Visit http://developer.android.com/training/index.html to get started.

Simple HTML5 app for mobile devices

I want to build a simple app where everything is offline and mostly it is an informational app with info pages and list pages. What is the best way to build an HTML5 app for it so I can easily port it to different platforms? I'm looking for a free solution.
This developer had an HTML5 app so he just converted it to and Android app as mentioned in the answer: Convert HTML5 into standalone Android App. So, is that the way to go if I'm building one from scratch? Would it be just as easy to convert it to iOS?
Also, how does performance look for such an app on Android/iOS/Windows Phone? I mean would the page sliding animation and stuff be just as fluid as a native app given that it is so simple?
Give PhoneGap a shot. It's probably the most popular platform that allows you to create mobile apps utilizing a browser, and it's free to use :)

Is PhoneGap the right choice for me?

I am new to PhoneGap, and I have several questions:
I need a way to develop an application that will have iOS, Android, and other platform compatibility. In other words, I want to write 1 app and get compatibility versions for different platforms.
By reading the "Get Started" guide linked by the PhoneGap website, I found there are different procedures for different platforms. So to have compatibility versions across platforms, do I have to go one-by-one and change all of them if I make a modification to my app?
Also, what exactly is PhoneGap Build? It seems like I can avoid all that hassle mentioned previously and toss my app into the PhoneGap Build? Do I really not have to do anything besides writing the app? What if I need to make changes?
And finally, I've read that PhoneGap works with HTML, CSS, and Javascript, but not PHP. What if my app needs to contact a server? Can PhoneGap handle that?
Thank you for bearing with all these questions!
PhoneGap achieves platform compatibility by embedding a webview within your application. Therefore you can apply your knowledge in HTML, CSS, JavaScript and it additionally provides ways to interact with native features (e.g. camera, gps, ...).
With PhoneGap you write one general web app, tweak parts for the specific platform (sometimes you do not have to this at all) and build it for that platform. The latter can be handled with PhoneGap Build service: It takes your webapp and bundles it for the mobile operating systems out there (Embeds it within a Java app on Android, an Objective-C app on iOs)
PhoneGap is able to communicate with a server hosting a PHP script just as every other web application. Trying to dynamically load resources from remote sites can be quite a hassle but this is another question.
traumalles is correct. All your HTML/Javascript/CSS is running from within a webview on the device. Your code is, therefore, all "client-side." You can communicate with a server just like with any other page. When they say PhoneGap isn't compatible with PHP, they mean only that PhoneGap can't execute PHP code like it's a server, because it's not. It's just loading your webapp in, basically, a browser.
One other important question is what exactly do you mean with "other platforms" phonegap does provide many functionality for nearly every platform but the different webbrowser of the mobile devices have their problems and limitations.
For example are there many problems if you want to provide your application on a WindowsPhone Device because the Webbrowser has a few limitations which will cause your app to not look and behave like a native app.
Just look a bit through the phonegap API you will see that some functions are just available for IOS or for Android and there are a few only Blackberry methods and so on.
So you really have to be careful when a framework tells you it will work on all devices.
So i really don't have a problem with phonegap i worked with it very great but there will be limitations you have to deal with.
If you primarily want to develop for IOS and Android you can really achieve great native like results !

Does Jquery Mobile Framework Help Web Developer

I am .net developer. I want to develop an application for mobile devices. As i am a web developer i am well versed with web technology & scripting languages. I am a big fan of JQuery so, i found something Jquery Mobile Framework for mobile application development.
So, I've got few questions:
Will this framework help me develop web applications or only for designing purpose?
Can i use my Jquery knowledge to implement web application using Jquery Mobile Framework?
Can i use Jquery AJAX in mobile app development?
It won't help you build a mobile "application" but it will help you create a mobile enabled web site.
It will help you build the front end of a mobile web application.
Yes
Yes, if you are referring to mobile web applications.
The back-end technology you use does not matter. I've built several .NET MVC sites using jQuery Mobile, which have all worked pretty well.
jQuery Mobile will help you build a website, you can then view that website in a browser or package it into an app. If you want to create native applications out of HTML/CSS/JS then you will need an intermediary step that lets you run a webview as your app. PhoneGap is an example of a framework that allows you to use native APIs while building your application in HTML/CSS/JS.
Your knowledge of jQuery will come-in handy but you will be forced to think about a jQuery Mobile website differently. For instance, pages are not HTML documents, but pseudo-pages that can be in separate documents but can also have multiple pseudo-pages inside a single HTML document. And because remote documents are brought into the DOM via AJAX (for animated transitions), you need to code your site to use unique IDs across the whole site, not just from page to page.
Absolutely! jQuery AJAX makes creating dynamic websites and native apps easy. You basically just load a bunch of views (in HTML/JS/CSS) into the app. package and then your server does the modeling. One cool thing to take into consideration is that since you are running from a mobile app., there is no domain from which the response is sent, so there is no cross-domain-policy to worry about.
If you have not yet checked-out PhoneGap, do so, and also see the documentation on the jQuery Mobile website regarding how to create PhoneGap applications using jQuery Mobile:
http://jquerymobile.com/demos/1.1.0/docs/pages/phonegap.html

Android application dev using the SDK or HTML, CSS and JS

Last night I learnt that it is possible to develop apps for Android using HTML, CSS and JavaScript, much like you would do a client side website. Is this a widely used approach? Because I have started to learn developing with the SDK but I naturally know more about HTML, CSS and Javascript, so I'd like to leverage that knowledge if possible.
So basically my question boils down to this: Are Android web apps as good as native apps? Can the same functionality be achieved through web apps?
Regards
Renault
Check http://www.phonegap.com/start/#android
PhoneGap is based Web Technologies HTML, CSS and JavaScript.
It's very simple to use it. Try it.
Check out Appcelerator Titanium
While other HTML/Css/JS frameworks run your apps inside a web-browser-like environment, Appcelerator claims to run your apps natively. And it seems (almost?) all the functionality that can be achieved through native apps can also be achieved through their SDK.
They also have several convenience features like directly running the app on an emulator or a device, packaging the app for deployment etc., and Titanium Developer runs on Windows, Linux and OS X.

Categories

Resources