Escolar Documentos
Profissional Documentos
Cultura Documentos
Abstract (i)
Acknowledgement (ii)
1. Introduction
2. Platform
3. Application Development
4. Overall evaluation
5. Future work
6. Snapshots
7. Conclusions
8. References
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
The good news is for both the consumers and developers. While consumers could enjoy a
low-cost Smart phones running Android, developers were given an unrestricted
customization rights. From a developer's point of view, Android has several unique features,
as listed below:
• The entire Application framework can be reused and replaced by selective
components
• Dalvik virtual machine enhances the power management systems (Learn about
Dalvik VM in the following subtitle)
• Support for 2D and 3D graphics (OpenGL ES 1.0), So lot of business for animation
developers.
• Reliable and enhanced data storage ( using SQLite framework)
• Developers can create media common applications since it supports common media
file formats(MPEG, MPEG3, MPEG4, H.286, AAC, AMR, JPG, PNG, GIF and
more)
• GSM, EDGE, 3G, HSCSD, Wi-Fi network applications support (Depends on
hardware).
2. PLATFORM
2.1 HARDWARE
First and foremost, Android is a software stack for mobile devices. This means that
high on the list of priorities is the preservation of battery power and the efficient management
of limited memory resources. There are five distinct layers to the Android system stack:
• The Acorn RISC Machine (ARM) Linux core forms the solid base upon which all the
other layers stand. Linux is a proven technology that is highly reliable, and the ARM
processor family is known for high performance on very low power requirements.
• The libraries provide the reusable and sharable low-level code for basic functions such
as codecs — software for coding and decoding digital sound and video — functions
2
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
for the presentation of rich graphics on a small displays, secure shell support for
encrypted TCP/IP traffic into the cloud, as well as component support for Web
browsing (WebKit), SQL database functionality (SQLite), and standard C library
functionality you would expect in a Linux system.
• The Dalvik run-time byte-code interpreter, which strongly resembles the Java™
language byte-code interpreter, adds a few distinct features that uniquely define the security
and power-preserving model of Android. Every application currently running, for example,
has its own user ID and its own copy of the interpreter running to strictly separate processes
for security and reliability.
• The Android application framework enables you to use and replace components as
you see fit. These high-level Java classes are tightly integrated components that define
the Android API.
• The Android core applications include the WebKit browser, Google calendar, Gmail,
Maps Application, SMS messenger, and a standard e-mail client, among others.
Android applications are written in the Java programming language, and you can
download many more from the Android market on the fly.
3
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
Android uses Linux for its device drivers, memory management, process
management, and networking. However you will never be programming to this layer directly.
The next level up contains the Android native libraries. They are all written in C/C++
internally, but you’ll be calling them through Java interfaces. In this layer you can find the
Surface Manager (for compositing windows), 2D and 3D graphics, Media codecs (MPEG-4,
H.264, MP3, etc.), the SQL database (SQLite), and a native web browser engine (WebKit).
Next is the Android runtime, including the Dalvik Virtual Machine. Dalvik runs dex
files, which are converted at compile time from standard class and jar files. Dex files are
more compact and efficient than class files, an important consideration for the limited
memory and battery powered devices that Android targets.
4
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
The core Java libraries are also part of the Android runtime. They are written in Java,
as is everything above this layer. Here, Android provides a substantial subset of the Java 5
Standard Edition packages, including Collections, I/O, and so forth.
The next level up is the Application Framework layer. Parts of this toolkit are
provided by Google, and parts are extensions or services that you write. The most important
component of the framework is the Activity Manager, which manages the life cycle of
applications and a
common “back-stack” for user navigation.
Finally, the top layer is the Applications layer. Most of your code will live here, along
side built-in applications such as the Phone and Web Browser.
2.4 Security
Android is a multi-process system, in which each application (and parts of the system)
runs in its own process. Most security between applications and the system is enforced at the
process level through standard Linux facilities, such as user and group IDs that are assigned
to applications. Additional finer-grained security features are provided through a
"permission" mechanism that enforces restrictions on the specific operations that a particular
process can perform, and per- URI permissions for granting ad-hoc access to specific pieces
of data.
Security Architecture
5
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
2.5 Performance
Devices hosting Android applications have limited capabilities. That's why code
should be efficient, avoid all unnecessary memory allocations, method calls (it takes a lot of
time) and so on.
In order to make our applications working fast on a mobile device we need to leave
back some habits, good from OOP point of view. In a mobile device we are not able to make
a full model of reality what we want to operate on.
- use native built-in methods - they're written in C/C++ what makes them faster about
10-100 times than implemented JAVA code (loops etc.). However note that calling native
method is more expensive then calling implemented one.
6
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
takes 2 times more time than in normal way: HashMap myMap2 = new HashMap();
- static over virtual - declare methods static if they do not need access to the object's
fields. It can be called faster, because it doesn't require a virtual method table
indirection. It's also good practice, because you can tell from the method signature that
calling the method can't alter the object's state.
- cache field lookups, because accessing object fields is lower than local variables. The
same situation is with methods - i.e. by for-statements, you should cache size() method
if it is possible.
3. Application Development
7
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
components of your application and what their capabilities and equirements are. We will
discuss soon, what the AndroidManifest.xml is responsible for.
Activity
Activities are the most common of the four Android building blocks. An activity is usually a
single screen in your application. Each activity is implemented as a single class that extends
the Activity base class. Your class will display a user interface composed of Views and
respond to events. Most applications consist of multiple screens. For example, a text
messaging application might have one screen that shows a list of contacts to send messages
to, a second screen to write the message to the chosen contact, and other screens to review
old messages or change settings.
Each of these screens would be implemented as an activity. Moving to another screen is
accomplished by a starting a new activity. In some cases an Activity may return a value to the
previous activity – for example an activity that lets the user pick a photo would return the
chosen photo to the caller. When a new screen opens, the previous screen is paused and put
onto a history stack. The user can navigate backward through previously opened screens in
the history.
Screens can also choose to be removed from the history stack when it would be
inappropriate for them to remain. Android retains history stacks for each application launched
from the home screen.
person would publish an IntentFilter that said that it knows how to handle the action VIEW
when applied to data representing a person. Activities publish their IntentFilters in the
AndroidManifest.xml file.
Intent Receiver
You can use an IntentReceiver when you want code in your application to execute in
reaction to an external event, for example, when the phone rings, or when the data network is
available, or when it's midnight. Intent receivers do not display a UI, although they may
display Notifications to alert the user if something interesting has happened. Intent receivers
are also registered in AndroidManifest.xml, but you can also register them from code using
Context.registerReceiver(). Your application does not have to be running for its intent
receivers to be called; the system will start your application, if necessary, when an intent
receiver is triggered. Applications can also send their own intent broadcasts to others with
Context.broadcastIntent().
Service
A Service is code that is long-lived and runs without a UI. A good example of this is a
media player playing songs from a play list. In a media player application, there would
probably be one or more activities that allow the user to choose songs and start playing them.
However, the music playback itself should not be handled by an activity because the user will
expect the music to keep playing even after navigating to a new screen. In this case, the
media player activity could start a service using Context.startService() to run in the
9
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
background to keep the music going. The system will then keep the music playback service
running until it has finished. (You can learn more about the priority given to services in the
Content Provider Applications can store their data in files, a SQLite database, preferences
or any other mechanism that makes sense. A content provider, however, is useful if you want
your application's data to be shared with other applications. A content provider is a class that
implements a standard set of methods to let other applications store and retrieve the type of
data that is handled by that content provider.system by reading Life Cycle of an Android
Application.) Note that you can connect to a service (and start it if it's not already running)
with the Context.bindService() method. When connected to a service, you can communicate
with it through an interface exposed by the service. For the music service, this might allow
you to pause, rewind, etc.
2. Select
10
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
3. Fill out the form with values fitting your applications purpose...
This are all the files for your first Android-Application (don't panic, mostly all of them are
resource-files)
11
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
Now we need to create a ‘Run-Configuration’. Open the -DropDown in the Eclipses upper
menu and Click "Open Run Dialog..."
Creating Run
12
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
4 Overall Evaluation
4.1 Advantages
There are a host of advantages that Google’s Android will derive from being an open
source software. Some of the advantages include:
• The ability for anyone to customize the Google Android platform will open up the
applications playing field to small and new players who lack the financial muscle to
negotiate with wireless carriers like AT&T and Orange.
• The consumer will benefit from having a wide range of mobile applications to choose
from since the monopoly will be broken by Google Android.
• Although this will depend on the carrier, one will be able to customize a mobile
phones using Google Android platform like never before, right down to the screen.
• Features like weather details, opening screen, live RSS feeds and even the icons on
the opening screen will be able to be customized.
• In addition, as a result of many mobile phones carrying Google Android, companies
will come up with such innovative products like the location – aware services that will
provide users with any information they might be in need of.
• This information could include knowing the location of a nearby convenience store or
filling station. In addition the entertainment functionalities will be taken a notch
higher by Google Android being able to offer online real time multiplayer games.
13
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
4.2 Limitations
Bluetooth limitations:
Google Talk functions and only the simplest implementation of Bluetooth. It'll work
with Bluetooth headsets but that's about it; no Bluetooth stereo, no contacts exchange, no
modem pairing and no using wireless keyboards.
Android uses a non-standard jvm: there is no guarantee that the same software will run on
multiple devices
14
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
won't have that and won't be releasing any form of Firefox until Google amends the limitation
of Android Apps.
5. Future Work
The good news is for both the consumers and developers. While consumers could
enjoy a low-cost Smart phones running Android, developers were given an unrestricted
customization rights. From a developer's point of view, Android has several advantages, as
listed below:
• The entire Application framework can be reused and replaced by selective
components
• Dalvik virtual machine enhances the power management systems (Learn about
Dalvik VM in the following subtitle)
• Support for 2D and 3D graphics (OpenGL ES 1.0), So lot of business for
Animation developers.
• Reliable and enhanced data storage ( using SQLite framework)
• Developers can create media common applications since it supports common
media file formats(MPEG, MPEG3, MPEG4, H.286, AAC, AMR, JPG, PNG,
GIF and more)
• GSM, EDGE, 3G, HSCSD, Wi-Fi network applications support (Depends on
hardware)
6. Snapshots
15
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
6. Conclusion
16
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
7. References
17
DEVELOPMENT, MAINTENANCE & VISUAL OF ANDROID
Websites:
http://code.google.com/android/
http://android-developers.blogspot.com
http://code.google.com/p/apps-for-android/
http://source.android.com
http://www.anddev.org
E-Books:
Beginning Android - Mark L Murphy
Hello Android (2nd Edition) - Ed Burnette
18