File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Android and the fly likes Is it possible to build a native GUI within an Android web app? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Is it possible to build a native GUI within an Android web app?" Watch "Is it possible to build a native GUI within an Android web app?" New topic

Is it possible to build a native GUI within an Android web app?

Daniel Trebbien
Ranch Hand

Joined: Jul 10, 2007
Posts: 60
For one Android app that I wrote, I chose to write the UI using the native UI subsystem (primarily I used a ListView). Is it possible to instead write Javascript that builds a UI using native widgets? If this is possible, I would imagine that it could only be accomplished with libraries like PhoneGap which expose native functionality to the web app.

I could, of course, emulate the look-and-feel of the native widget system using CSS and HTML, but one nice thing about using the native UI widgets is that the look-and-feel of native Android widgets changes slightly from API level to API level, so any emulation of the native look-and-feel would need to be varied for each API level.
Sebastien Blanc
Ranch Hand

Joined: Nov 18, 2004
Posts: 33
As far as I know I don't think it's possible but I will check with Damon maybe he has more info on this.

Sebastien Blanc
Pro Android Web Apps: Developing HTML5, JavaScript, CSS, and Chrome OS Web Apps
Damon Oehlman

Joined: Jan 26, 2011
Posts: 23
Hey Daniel,

As per another of your questions, I think a PhoneGap plugin would probably be a way that you could achieve this. I certainly understand your reasons for doing this but I guess I would consider it a lot of effort for potentially limited returns. If native controls are a priority for you and you are comfortable working with Javascript, then possibly something like Appcelerator would be a better choice for you than a "web app" approach.

While Appcelerator do get bundled up into the cross-platform mobile web app technologies, there approach is fundamentally different. Their technology generates a native UI from Javascript application code, with Appcelerator acting as kind of a interpreter between Javascript and the native platform.

While the approach is not one I am a fan of (I think there are potentially long term problems with the sustainability of the approach, given a broad spectrum of devices they may have to support), it definitely meets the requirements of providing application users a UI experience that is consistent with other "purely native" applications that they may be using on their device.

Thanks for the question - I think it's got some good "food for thought" for all of us with the intention of writing mobile web apps.


Damon Oehlman
@DamonOehlman - Web - Blog
subject: Is it possible to build a native GUI within an Android web app?
It's not a secret anymore!