2024年3月29日发(作者:恭帅)
Android
Android, as a system, is a Java-based operating system that runs on
the Linux kernel. The system is very lightweight and full featured.
Android applications are developed using Java and can be ported rather
easily to the new platform. If you have not yet downloaded Java or are
unsure about which version you need, I detail the installation of the
development environment in Chapter 2. Other features of Android include
an accelerated 3-D graphics engine (based on hardware support), database
support powered by SQLite, and an integrated web browser.
If you are familiar with Java programming or are an OOP developer of
any sort, you are likely used to programmatic user interface (UI)
development—that is, UI placement which is handled directly within the
program code. Android, while recognizing and allowing for programmatic
UI development, also supports the newer, XML-based UI layout. XML UI
layout is a fairly new concept to the average desktop developer. I will
cover both the XML UI layout and the programmatic UI development in the
supporting chapters of this book.
One of the more exciting and compelling features of Android is that,
because of its architecture, third-party applications—including those
that are “home grown”—are executed with the same system priority as
those that are bundled with the core system. This is a major departure
from most systems, which give embedded system apps a greater execution
priority than the thread priority available to apps created by third-party
developers. Also, each application is executed within its own thread using
a very lightweight virtual machine.
Aside from the very generous SDK and the well-formed libraries that
are available to us to develop with, the most exciting feature for Android
developers is that we now have access to anything the operating system
has access to. In other words, if you want to create an application that
dials the phone, you have access to the phone’s dialer; if you want to
create an application that utilizes the phone’s internal GPS (if
equipped), you have access to it. The potential for developers to create
dynamic and intriguing applications is now wide open.
On top of all the features that are available from the Android side
of the equation, Google has thrown in some very tantalizing features of
its own. Developers of Android applications will be able to tie their
applications into existing Google offerings such as Google Maps and the
omnipresent Google Search. Suppose you want to write an application that
pulls up a Google map of where an incoming call is emanating from, or you
want to be able to store common search results with your contacts; the
doors of possibility have been flung wide open with Android.
Chapter 2 begins your journey to Android development. You will learn
the how’s and why’s of using specific development environments or
integrated development environments (IDE), and you will download and
install the Java IDE Eclipse.
Application Components
A central feature of Android is that one application can make use of
elements of other applications (provided those applications permit it).
For example, if your application needs to display a scrolling list of
images and another application has developed a suitable scroller and made
it available to others, you can call upon that scroller to do the work,
rather than develop your own. Your application doesn't incorporate the
code of the other application or link to it. Rather, it simply starts up
that piece of the other application when the need arises.
2024年3月29日发(作者:恭帅)
Android
Android, as a system, is a Java-based operating system that runs on
the Linux kernel. The system is very lightweight and full featured.
Android applications are developed using Java and can be ported rather
easily to the new platform. If you have not yet downloaded Java or are
unsure about which version you need, I detail the installation of the
development environment in Chapter 2. Other features of Android include
an accelerated 3-D graphics engine (based on hardware support), database
support powered by SQLite, and an integrated web browser.
If you are familiar with Java programming or are an OOP developer of
any sort, you are likely used to programmatic user interface (UI)
development—that is, UI placement which is handled directly within the
program code. Android, while recognizing and allowing for programmatic
UI development, also supports the newer, XML-based UI layout. XML UI
layout is a fairly new concept to the average desktop developer. I will
cover both the XML UI layout and the programmatic UI development in the
supporting chapters of this book.
One of the more exciting and compelling features of Android is that,
because of its architecture, third-party applications—including those
that are “home grown”—are executed with the same system priority as
those that are bundled with the core system. This is a major departure
from most systems, which give embedded system apps a greater execution
priority than the thread priority available to apps created by third-party
developers. Also, each application is executed within its own thread using
a very lightweight virtual machine.
Aside from the very generous SDK and the well-formed libraries that
are available to us to develop with, the most exciting feature for Android
developers is that we now have access to anything the operating system
has access to. In other words, if you want to create an application that
dials the phone, you have access to the phone’s dialer; if you want to
create an application that utilizes the phone’s internal GPS (if
equipped), you have access to it. The potential for developers to create
dynamic and intriguing applications is now wide open.
On top of all the features that are available from the Android side
of the equation, Google has thrown in some very tantalizing features of
its own. Developers of Android applications will be able to tie their
applications into existing Google offerings such as Google Maps and the
omnipresent Google Search. Suppose you want to write an application that
pulls up a Google map of where an incoming call is emanating from, or you
want to be able to store common search results with your contacts; the
doors of possibility have been flung wide open with Android.
Chapter 2 begins your journey to Android development. You will learn
the how’s and why’s of using specific development environments or
integrated development environments (IDE), and you will download and
install the Java IDE Eclipse.
Application Components
A central feature of Android is that one application can make use of
elements of other applications (provided those applications permit it).
For example, if your application needs to display a scrolling list of
images and another application has developed a suitable scroller and made
it available to others, you can call upon that scroller to do the work,
rather than develop your own. Your application doesn't incorporate the
code of the other application or link to it. Rather, it simply starts up
that piece of the other application when the need arises.