• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

A question about portability

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?

Posts: 43081
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic