Development Resources

Aside from the information on this wiki, there are plenty of sites on the Internet that will teach you the basics of programming and development. Here are some of our favorite free external sites.

Note:

Not only is the source code for Android freely available, the tools, libraries, compilers, and everything else used to build Android apps and Android itself are also available at no cost. Even better, there are free instructions, tutorials, guides, sample code, lessons, and more all over the Internet. So provided that you have a decent computer, a reliable Internet connection, and enough time to sit and learn, you should have no financial barriers to writing your own apps and building CyanogenMod itself right at home.

Programming Basics

If you’re entirely new to the world of programming, it may not be a bad idea to spend a few days perusing some of the most basic concepts before you jump into specific languages. Here are a few sites that offer some elementary lessons that will get you started.

  • Code Academy — A web site dedicated to teaching you how to write programs. It’s interactive and tracks your progress, even allowing you to share what you’re learning with others. Code Academy uses the JavaScript language. JavaScript isn’t the same as Java (the language in which most Android apps are written), but the concepts are pretty much the same, and you’ll be able to apply what you learn to writing Android apps. It’s also worth noting that JavaScript is a language run on most Web browsers, so the skills you learn from this site will be instantly useful if you want to create interactive web pages and even user interface stuff in other languages.
  • MIT’s Introduction to Programming Class — if you’re more into traditional classroom style education, consider taking the free Open CourseWare classes from MIT. This class is for those who have little to no previous programming experience and uses the Python language. Python, a very powerful language, is available on Android devices, but concepts learned with Python also translate to Java, C, and C++.

Learn the Java language

Many apps on Android are written in Java, and much of Android’s internal frameworks are also written in Java. So having an familiarity of the Java language is helpful not only for writing your own apps, but if you want to tweak or add features to the Android user interface itself.

  • Thinking in Java — a free online book by Bruce Eckel. This book teaches the language of Java. It doesn’t include stuff particular to Android, but covers the basic syntax and linguistic concepts that Java programmers use. If you’re just starting with Java, this is a good book to read. Sample code is included. Should you prefer a newer paper-version, “Thinking in Java” is available as a printed edition as well.

Learn the C language

Much of the “lower level” portion of Android are written in the C language. The Linux-based Android kernel is also written in C, and C is used by many apps as well.

Learn the C++ language

C++ is an “object oriented” version of C.

Learn about the build system (GNU Make)

  • Google’s original documentation about the build system
  • GNU Make manual — the Android build system is built on top of the “make” command. It’s not quite a programming language, but it is a potentially complex mix of “recipes” and “rules” that you must understand to know how Android efficiently builds all the code into a flashable .zip you can install onto a device.
  • The Android-Building Group — this is Google’s official Google Group for building AOSP (Android Open Source Project– or vanilla Android from Google). If you have questions, this is a good place to find answers.

Learn about the Android kernel (based on the Linux kernel)

  • How To Build A Kernel A tutorial from Google on how to build the Android kernel from scratch. CyanogenMod will automatically build the kernel as part of the build, provided that the kernel is in /kernel/vendorname/device/codename and referenced from the appropriate .mk file.

Learn about the Android Frameworks

The official Android Developer Site — This is the central documentation site from Google about development for Android– in other words, bookmark this site, as you will refer to it again and again as you create your own apps (or change the framework itself to affect apps that run).

Android classes — If you’re going to write a Java program for Android, this is the central location for learning about all the Android-specific classes available.

Content of this page is based on informations from wiki.cyanogenmod.org, under CC BY-SA 3.0 licence.