I have to design a android,ios application for my website.I searched and find out that phonegap can be good one for that.Please provide me info that how to get the content of website in phonegap?On the first page i have buttons like home,contact etc.On click of home button,the home page from website should be shown.
PhoneGap is set of libraries like jQuery.
You normally write html pages and include javascript files from phonegap.
Check out phonegap example project.
Look, what you are talking about is .html,.css,.js files that you can easily get after saving any web page from your web-browser.
Rest you can use in the www folder of your phonegap project. And I
would rather suggest you to go for webview present in the native
android that is nothing but actually would provide you the same
functionality that you have been looking for.
---Edit---
Now as you have said that you want the home page buttons like about us etc. that would be copied via web browser and would be there for you as far as the html code is concerned but if you want it to look well on a small mobile device that you should create a responsive designed html and you should read some good articles about responsive web design. That would actually change your way of thinking about creating applications via html within mobile devices.
Related
I am trying to achieve this in Appcelerator Alloy: I would like my users to be able to click a UI button to save a website currently shown in a WebView element for later recall. It should then work offline and include CSS and Images included in the HTML (and CSS) code. Is there any best practice to start off with here? I am targeting iOS and android with this app.
Thank you for your input!
jŒ
I will not post code here, but I can tell you what to do, as I coded the same thing a few days ago. But not with Alloy.
You have to download the html content via xhr get or post and save it into a file to the applicationDataDirectory. Then you can access to it completely whenever you want.
I am pretty new to jQuery.I have heard of building mobile web apps with jquery mobile. I plan to open up a list view in jquery with horizontal navigation to sublists and further to a detailed page , sort of like a menu to submenu to a detailed page with images and text. Is there a way I can acheieve this in jquery? Also planning to add the jquery index.html? file in my android project and call it via webview. I just need some demo apps regarding listview and sublist navigation to detailed pages as reference. Anyone has any idea regarding the same?
Thanks!
Justin.
Well, for a start, you could check the demo API in here. You'll get a pretty demonstration of the listview, different widget you could use in JQM. For Android Webview, I can't help though
I want to know if it's possible to design my android app UI with HTML5 and CSS3.
If it's possible, is there any performance issue?
Android has WebView which can render HTML content, but it doesn't provide the same user experience as native apps so its use is generally discouraged.
Yes it possible. As rhoadster91 stated, you can use a normal Android WebView which loads your "index.html". All your HTML files should be in the "assets/www" directory. But you'll find plenty tutorials out there which explain everything step by step. Have a look at Googles developer site.
A second possibility would be Phonegap. It is a little tool which helps you to deploy your app for various devices (Android, iOS, WP,...) while coding your app only once in HTML.
I experimented with jquery mobile, native application and phonegap. Building a web application at first seemed very attractive at first as the coding is a lot easier compared to native applications. Here is my opinion based on my research:
Using phonegap slows your application responses, it loads slowly and together with jquery mobile the response and load time increases. So I didnot use it.
Using jquery alone was no different in Gingerbread mobile and on emulator you can clearly see the lag in switching between one div to another div. I didnot use it either.
What I did was use android Webview. I wrote my own javascript and css and placed them on the head section of my page. Used div for changing pages on button click. This approach worked really good giving nearly native performance.
I don't quite understand the cordova plugin procedure.
I found out that it works through the Cordova Webview, but I don't know which
functions and classes are necessary.
It would be great if someone had the time to explain it, a sequencediagramm would be the best for understanding.
greetings, Kurt
This may help you to understand more:
Using WebViews
A WebView uses the same rendering and JavaScript engine as the browser, but it runs under the control of your application. The WebView can be full screen or you can mix it with other Views. The content for your WebView can come from anywhere. The WebView can download content from the web, or it can come from local files stored in your assets directory. The content can even be dynamically generated by your application code.
and
Android WebView, Javascript and CSS
I have come across some situations where I had to use a WebView to display some HTML content. Displaying HTML content is pretty straight-forward. But when it comes to controlling the web view, it gets a little complex. Things like showing alerts, manipulating divs and controlling the activity (closing/finishing). This example shows a few techniques that will get you going with Javascript and CSS with WebView.
Does someone know of a library that is fairly "drop in" and allows you to easily put together multiple authentication options in an Android app to services like Facebook, OpenID, Twitter, etc. much like RPX does?
Make a little HTML page with RPX embedded inside it (like a real site) inside your res folder and render it using WebView. You would need WebView anyways since as a requirement of OpenID and OpenAuth and everything needs you to go to their site. So in the end, you would need to load up a WebView to show the user that screen anyways.