aspose file tools*
The moose likes Android and the fly likes A Question on Android SDK for Dave and Jeff Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "A Question on Android SDK for Dave and Jeff" Watch "A Question on Android SDK for Dave and Jeff" New topic
Author

A Question on Android SDK for Dave and Jeff

Kingsley Udeh
Greenhorn

Joined: Jul 28, 2010
Posts: 4
Hello Dave and Jeff,

I'm still at entry level position in Android. Could please tell how I could integrate HTML 5 with Android in developing a smartphone/Ipad driven app?

Thanks and regards,
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41816
    
  62
That's what the WebView class is for: http://developer.android.com/guide/webapps/webview.html


Ping & DNS - my free Android networking tools app
Kingsley Udeh
Greenhorn

Joined: Jul 28, 2010
Posts: 4
Thank you, Marshal. I have integrated HTML 5 before with Android, perhaps, in a very crude or unacceptable method . However, I don't think I did it perfectly or that my intention would have worked at the end of the day.

For example, if one wanted to write a PHP script on the server side for the HTML 5 page(s), say, the login page, could the WebView Class be used to accomplish it? How could that be achieved? Please, I'm not an expert in Android yet. I know certainly that I need some personal development regarding this tech(Android).
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41816
    
  62
A WebView is essentially a browser minus all the UI stuff - just an area that displays a web page, which can be embedded as a native component in an Android app. You provide it with an URL and it'll display it. Whatever (more or less, some caveats apply) you can code in HTML/CSS/JavaScript, WebView can display. But it's also a native component, and you can use several ways of influencing its behavior at runtime from your Android/Java code. It can work well if you have a mobile-friendly web site but want to provide more native integration than just displaying the mobile site in the native browser would give you. The article I linked to talks about some of those functionalities.
D. Smith
Author
Greenhorn

Joined: Jan 11, 2013
Posts: 25
    
    5

I'm only chiming in here because I got called out by name, but Kingsley pretty much said it all. With a WebView and WebViewClient inside of an Activity, you can create a native wrapper around any HTML content that you need to display as part of your application. You will likely find that you will need to manually enable a lot of the WebSettings to get the same behavior out of WebView that you would expect from the Browser. The functionality is all there, but most of it (like JavaScript) is disabled by default.


Android Recipes: A Problem Solution Approach: http://www.apress.com/9781430246145
Kingsley Udeh
Greenhorn

Joined: Jul 28, 2010
Posts: 4
Thanks to you all for your timely response to my questions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A Question on Android SDK for Dave and Jeff