Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can I develop android applications using gwt?

Tags:

android

gwt

(or is there a way to convert gwt apps to android apps?)

like image 281
pstorli Avatar asked May 09 '11 03:05

pstorli


People also ask

Does Google use GWT?

Google announced GWT at the JavaOne conference in 2006. In August 2010, Google acquired Instantiations, a company known for focusing on Eclipse Java developer tools, including GWT Designer, which is now bundled with Google Plugin for Eclipse.

What is purpose of GWT?

GWT is a development toolkit for building and optimizing complex browser-based applications. Its goal is to enable productive development of high-performance web applications without the developer having to be an expert in browser quirks, XMLHttpRequest, and JavaScript.

Can you develop Android apps without Java?

Despite not using Java to build Android apps, Xamarin allows you to create native apps that achieve a good user experience, which is a core aspect that any respectable app must-have. Furthermore, Xamarin supports developing cross-platform applications in case you need to develop such an app.

What is GWT compiler?

The heart of GWT is a compiler that converts Java source into JavaScript, transforming your working Java application into an equivalent JavaScript application. The GWT compiler supports the vast majority of the Java language. The GWT runtime library emulates a relevant subset of the Java runtime library.


2 Answers

It is not entirely correct to say that GWT is meant to create code that runs in a browser. GWT translates Java to Javascript and includes ui support and other goodies for web apps. There are a few native application wrappers that take Javascript applications and make them native for Android (or other mobile operating systems) with additional support for device access through Javascript apis. With a glue layer in between GWT and a native wrapper for a Javascript app you have a complete solution from GWT programming to native app.

So, you cannot do this with GWT alone but if you combine GWT with some other libraries it is absolutely possible.

Checkout PhoneGap/Cordova and either m-gwt or GWTMobile. NextInterfaces is built on top of PhoneGap and GWT-Mobile. I'm sure that there are more, but those seem to be the common solutions.

like image 127
Adam Avatar answered Oct 10 '22 05:10

Adam


If you want to develop native Android Apps (i.e. written in Java) then you cannot use GWT. GWT is a framework for developing applications that run in a browser: you write your application in Java and GWT will compile it to JavaScript, which will then run in the browser.

If you want to develop web-applications that work in Android's browser, than you can most definitely use GWT. Native support for touch events was recently added to GWT and there are others who are developing widgets, e.g. http://code.google.com/p/gwt-touch/

like image 45
Stefan Avatar answered Oct 10 '22 05:10

Stefan