I'm new to all this game developing, and I'm starting to learn java because I was told it was a great way to start. I want to later on create games for the android market, and want to get a good view from you guys, so I know what I'm dealing with exactly.

I DO realize that Android development has different architectures and whatnot (that a good way to say it?)


  • 4
    \$\begingroup\$ For what it's worth, Android applications are typically written in Java. The difference between the two is that "Android" is an operating system and "Java" is a programming language. They serve different (non-overlapping) purposes. \$\endgroup\$ Oct 7 '10 at 0:10
  • \$\begingroup\$ Clarified OP's question title. \$\endgroup\$
    – Engineer
    Sep 10 '11 at 9:55

To create Android applications you use Java and the extension libraries that Android provides. These aren't extensions in the Java Language sort of way; I mean libraries that are shipped with Android to help you achieve the common things you'd want to do on a cellphone.

For example, Blackberry (another Java-based mobile OS) uses Java as the language of choice, and Research In Motion provides a set of libraries in the RIM package that helps me abstract things that I'd commonly do on my phone.

You can use pure Java but most of the time you want to use the RIM libraries provided by RIM.

If you're completely new to programming I would recommend first learning good Java principles - classes, methods, object-oriented programming, etc; then learning the Android API provided by Google. If you learn Android first you'll get confused quick and not follow good programming practices.

I recommend starting with the book Head First Java.


Android uses its own Java like implementation. You write Java syntax code and can use Many Java APIs, but there are many differences:

  • Android applications have a special Lifecycle:
    • no main function
    • your applications contains Activities with onCreate, onResume, onPause, onDestroy functions that you must override
  • Code is compiled into Dalvik opcodes (not java byte code);
  • Many APIs are similars but you don't have all J2SE APIs. You must check on the developper site;
  • Many APIs are limited to Android (Contacts, Power Management, Graphics...);
  • IHM are android onlys (no Swing, no JavaFX ...). You must use XML to declare you GUI;
  • you can use java jars (if they use only compatible APIs) but they are converted into dalvik.

So, it is like a new platform; but, if you know Java, it is very easy to develop on Android. Download the SDK and try to play with provided samples and customize them. You can use good IDE as Eclipse and Idea (Android plugin will arrive in Idea 10 Community editions).

For C/C++ geeks, you can use NDK (Native Development Kit) but you need some Java bootstrap code and JNI knowledge.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.