Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question about portability

 
Jeremy Hayes
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've spent a while working with Java, so the fact that moving to Android developement is not a huge leap, makes it more interesting to me than some other mobile OS's.

But the question I have is about the approach to take:

Could I write a pure Java application and easily port it to Android or would that be very difficult?

My limited understanding of Android programming suggests that it is a bit like working in a container ( like an applet or servlet container ).
Does that mean that an application written in pure Java would need a complete re-write to get it working on Android?

Thanks,
Jeremy
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Android is based on Java 5, minus some packages, plus some other packages. So if your app contains Java 6 stuff, or uses one of the Java 5 packages not available on Android, then you'd need to replace those.

What will need to be completely rewritten is anything GUI related, because Android has neither AWT nor Swing, but comes with its own GUI toolkit. The application lifecycle and app structure are also different, so any sizable GUI application would need serious work. Non-GUI code (like a library), on the other hand, may not need much work at all.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic