How do I create a android webview mobile app with jquery mobile - android

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

Related

Is it possible to create an android app with full HTML design?

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.

Android - can I create an HTML5 screen in a native Android app?

I am trying to add a podcast and a youtube channel to my native Android app, but it seems it would be much easier if I just use HTML and access that media as it is on the web.
Is it possible to have an activity be HTML5 or a basic web view? If so, how can I do that?
Thanks!
Yes this is possible, have a look into WebView
http://developer.android.com/reference/android/webkit/WebView.html
A View that displays web pages. This class is the basis upon which you can roll your own web browser or simply display some online content within your Activity. It uses the WebKit rendering engine to display web pages and includes methods to navigate forward and backward through a history, zoom in and out, perform text searches and more.
You may find some performance/compatability issues but this is the easiest solution and one that I would do as a first step.

How to get the content of website in phonegap?

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.

UIPageControl alike Android Phonegap?

Is there anything that I can use to mimic the UIPageControl in Android Phonegap? I've tried to research it but can't find any clue.
As far as I know in HTNL and Jquery i dont think you have any control to do such. You will have to implement it on your own. You will have to take an image tag in HTML with two buttons / handle the swipe event in jquery Mobile (http://jquerymobile.com/test/docs/api/events.html) and then upload a new image and call redraw on the page.

PhoneGap android page navigation

I am a newbie to Android development and was using PhoneGap to develop a simple application. Can anyone please answer the below questions?
In all the sample applications found in the internet, they use a single index.html file. How to develop an application in phonegap containing more than one page?
How can we navigate from one page to another?
I want to have the same code to work in iphone also, so if I create more than one activity will the same code work in Iphone?
Sorry, it was a dumb question and since I was new to phonegap development I had no idea what I was doing.
The problem was that at the beginning I considered it like developing an android application. If you consider it like developing a website, you will find that the answer is very simple.
So for example, in my home page I provided two anchor tags which will point to my webpages which will handle the other two functionalities. ie. In my sample application to create and list profiles, the homepage would look like this.
< a href="addProfile.html" style="styling for the anchor to look like a button"/>
< a href="listProfile.html" style="styling for the anchor to look like a button"/>
We use JavaScript to navigate between all of the pages we have in our application, navigating within a frame.
And yes, if it works in PhoneGap, it should work in both Android and iOS.

Categories

Resources