Sams Teach Yourself Java™ in 24 Hours (Covering Java 7 and Android)

(singke) #1
ptg7068951

344 HOUR 24:Writing Android Apps


This effort started slowly, but since early 2010 it has exploded and become
a genuine rival to iPhone and other mobile platforms. All major phone car-
riers now offer Android phones. There’s also a growing market for tablet
and e-book readers.
Before Android, mobile application development required expensive pro-
gramming tools and developer programs. The makers of the phone had
control over who’d be allowed to create apps for them and whether the
apps could be sold to users.
Android tears down that wall.
The open-source and non-proprietary nature of Android means that any-
one can develop, release, and sell apps. The only cost involved is a nomi-
nal fee to submit apps to Google’s marketplace. Everything else is free.
The place to download the Android SDK and find out more about creating
programs for the platform is the Android Developer site at http://
developer.android.com. You will consult it often as you write your own
apps because it documents every class in Android’s Java class library and
serves as an extensive online reference.
Writing Android apps is easier if you’re using an integrated development
environment(IDE) that’s equipped to support the Android SDK. The most
popular IDE for Android programming is Eclipse, which also is free and
open source. An Android Plug-in for Eclipse makes the SDK function
seamlessly inside the IDE.
You can use Eclipse to write Android apps, test them in an emulator that
acts like an Android phone and even deploy them on an actual device.
For most of its existence, the Java language has been used to write pro-
grams that run in one of three places: a desktop computer, a web server, or
a web browser.
Android puts Java everywhere. Your programs can be deployed on mil-
lions of phones and other mobile devices.
This fulfills the original design goal of Java back when James Gosling
invented the language while working at Sun Microsystems in the mid
1990s. Sun wanted a language that could run everywhere on devices such
as phones, smart cards, and appliances.
Java’s developers set aside those dreams when the language became popu-
lar first as a means of running interactive web programs and then as a
general-purpose language.
Free download pdf