Nainesh Android Report
Nainesh Android Report
ABSTRACT
ANROID:
Google's Android operating system is an open-source platform that's currently available on a wide variety of smart
phones. Android has its advantages -- it's highly customizable, for one -- but it's also somewhat geeky software that can seem
intimidating to Smartphone newbie’s.
Android is available on a variety of handsets, including Google's Nexus One (which is manufactured by HTC) and Verizon's
Motorola Droid. The open nature of the Android platform allows handset manufacturers to customize the software for use on
their handsets. As a result, the Android software can look and feel very different on different handsets.
Android's open nature means that almost anyone can create an application to run on it. And you will find a growing
selection of titles available in the Android Market, the platform's answer to Apple's App Store. Android supports multi-
tasking, too, so you can run multiple apps at once. This means you can open a Web page, for example, and as it loads, check
for incoming e-mail. It's handy.
Android also has the benefit of being closely tied to Google; the company offers lots of excellent mobile apps.
Some, like Google Maps, are available on different mobile platforms, but others, like the excellent Google Maps Navigation
(beta), are only available on Android phones.
The Android OS lacks the elegance of its chief rivals, Apple's iPhone OS and Palm's web OS, and the fact that it's
available in so many versions can be very confusing. But it has the benefit of being available on a variety of handsets, and
offers customization its rivals can't touch. If you're willing to put in the time to learn all about Android and how to use it,
you're likely to find that this mobile platform is powerful.
1
ANDROAID BROWSING SPEED
AUTHOR: NAVDIP R. TERAIYA system, developed by Google and later the Open
Handset Alliance. It allows developers to write
NAINESH ZAVERI
managed code in a Java-like language that utilizes
SANJAY MAKVANA Google-developed Java libraries, but does not support
EMAIL: [email protected] programs developed in native code.
Android has been criticized for not being all open-
[email protected]
source software despite what was announced by
Google. Parts of the SDK are proprietary and closed
source and some believe this is so that Google can
write managed code in a Java-like language that follow T-Mobile’s lead and unveil their products for
utilizes Google-developed Java libraries, but does Android. For instance Qualcomm have announced
not support programs developed in native code. that it is working on more than five Android based
handsets to be released during Q1 2009. Android
Android has been criticized for not being all open-
source software despite what was announced by being free also means that smaller handset
Google. Parts of the SDK are proprietary and manufacturers don’t have to worry about the (very
closed source and some believe this is so that large) headache of writing and maintaining an
Google operating system.
can control the platform. Google will continue to
make money from online advertising, but now Android is appealing to developers
seeks to extend this onto mobile devices.
Android apps can be developed on any
platform (Windows XP and Vista, Linux, and
2
ANDROAID BROWSING SPEED
Mac OS X) where iPhone apps can only be than for iPhone apps where an (initially) successful
developed on a fairly new Mac. subscription model will decrease the urgency to find
iPhone apps require developers to learn a work-able advertising solution
Objective-C (which is used almost nowhere
outside Apple). But Android is Java which all
mobile app developers are familiar with. Why is Google Launching Android?
Anyone can develop and launch an Android
Almost everyone recognises that mobile is the
app whereas Apple has strict control of their
App Store.
next big advertising medium. Google is behind
Getting your iPhone app available in the some of its rivals in mobile (for instance in
App Store requires you to jump through the mobile search where Yahoo and mobile
hoops of an approval process which can take specialist like Medio Systems and JumpTap lead
2-3 months (and could be rejected for the way), so this is its way of “catching up”.
“competing” with a native application!) But
Android apps can be available in the Android They want a piece of the mobile advertising
Market instantly. market. Google CEO Eric Schmidt was quoted
as saying that “he's less than impressed with the
Android is feature rich
advertising possibilities for properties like
Android can support the same hardware as
the iPhone: touchscreen, accelerometer, GPS,
YouTube, and Web2.0 in general. But mobile,
WiFi, SMS & still camera; plus features that the well, that's a different thing.”
iPhone doesn’t support: MMS, video camera &
Rather than building the hardware (like Apple),
bluetooth
Google have stuck to what they are good at and
Android has some fresh ideas like Google Maps
“street view” and customisable home page
built the software. In the long run they will look
Unlike the iPhone, apps on an Android handset into where and how they can insert ads into
can run in parallel (eg an app running in the Android.
background can send an alert)
The key advantage that an operating system
The Android platform is open source and
extensible by the developer community where as the (OS) like Android has (over the iPhone OS) is
iPhone is controlled by Apple that its open systems and standards will allow
3rd parties to develop apps with no interference
Android is appealing to manufacturers
or limits. Clearly Google believe that the success
Android is a free OS so an Android-enabled
of Android will be made by the quality of the
smartphone should be cheaper than a normal
smartphone. All the major manufacturers are
apps that it has available.
looking at using it.
At the press conference to announce the release
In the US, AT&T has exclusive rights to sell the
of the T-mobile G-1, Cole Brodman, Chief
iPhone 3G (for the next 5 years), but Android is
Technology and Innovation officer for T-Mobile
license and operator independent
said: “The open market place is really going to
Android is appealing to Advertisers drive innovation on this platform”
Unlike iPhone apps, which sell on the app store
within iTunes, there is no structured marketplace for Advocates of Apple’s approach say that
Android apps customers are protected from bad user
This is good news as the users will get free apps, experiences by Apple controlling which apps to
and an advertising model will emerge more quickly
approve and which to deny. The same argument
3
ANDROAID BROWSING SPEED
was used by the mobile carriers about their Android being free also means that smaller
‘walled garden’ approach, and has not proven handset manufacturers don’t have to worry
successful. People don’t want to be told what about the (very large) headache of writing and
they can and can’t do, not just when it comes to maintaining an operating system.
watching porn (which the iPhone apps don’t
allow) but about everything. It is developed by Google and later
the Open Handset Alliance (OHA).
Unveiling of the Android platform
Potential Penetration of Android was announced on 5 November 2007
With Android being part of the Open Handset with the founding of OHA. It is based
Alliance, the other members of the alliance will on the Linux kernel. It allows writing
follow T-Mobile’s lead and unveil their products
managed code in the Java language.
for Android. For instance Qualcomm have
announced that it is working on more than five Possibility to write applications in
Android based handsets to be released during other languages and compiling it to
Q1 2009. ARM native code exists.
4
ANDROAID BROWSING SPEED
5
ANDROAID BROWSING SPEED
ANDROID ARCHITECTURE
7
ANDROAID BROWSING SPEED
8
ANDROAID BROWSING SPEED
9
ANDROAID BROWSING SPEED
10
ANDROAID BROWSING SPEED
the Dalvik virtual machine. Dalvik for core system services such as
Dalvik VM executes files in the and driver model. The kernel also acts
which is optimized for minimal hardware and the rest of the software
11
ANDROAID BROWSING SPEED
apache
license
File System
12
ANDROAID BROWSING SPEED
13
ANDROAID BROWSING SPEED
PERFORMANCE
14
ANDROAID BROWSING SPEED
Activities are the most common of the four (the front door of the application), VIEW,
Android building blocks. An activity is PICK, EDIT, etc. The data is expressed as a
usually a single screen in your application. URI. For example, to view contact
Each activity is implemented as a single information for a person, you would create
class that extends the Activity base class. intent with the VIEW action and the data set
Your class will display a user interface to a URI representing that person.
15
ANDROAID BROWSING SPEED
contact information for a person would Manager to alert the user if something
publish an Intent Filter that said that it interesting has happened. Broadcast
knows how to handle the action VIEW when Receivers are registered in
applied to data representing a person. AndroidManifest.xml, but you can also
Activities publish their Intent Filters in the register them from code using
AndroidManifest.xml file. Context.registerReceiver (). Your
application does not have to be running for
The new activity is informed of the intent,
its BroadcastReceivers to be called; the
which causes it to be launched. The process
system will start your application, if
of resolving intents happens at run time
necessary, when a BroadcastReceiver is
when start Activity is called, which offers
triggered. Applications can also send their
two key benefits:
own intent broadcasts to others with
Activities can reuse functionality Context.sendBroadcast ().
from other components simply by
making a request in the form of an
Intent
SERVICE
Activities can be replaced at any
time by a new Activity with an
equivalent Intent Filter
A Service is code that is long-lived and runs
BROADCAST INET RECEIVER
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
You can use a Broadcast Receiver when you
probably be one or more activities that allow
want code in your application to execute in
the user to choose songs and start playing
reaction to an external event, for example,
them. However, the music playback itself
when the phone rings, or when the data
should not be handled by an activity because
network is available, or when it's midnight.
the user will expect the music to keep
Broadcast Receivers do not display a UI,
playing even after navigating to a new
although they may use the Notification
screen. In this case, the media player activity
16
ANDROAID BROWSING SPEED
could start a service using Not every application needs to have all four,
Context.startService () to run in the but your application will be written with
background to keep the music going. The some combination of these.
system will then keep the music playback All the components needed for android
service running until it has finished. Note application should listed in an xml file
that you can connect to a service (and start it called AndroidManifest.xml. This is an
if it's not already running) with the XML file where you declare the components
Context.bindService () method. When of your application and what their
connected to a service, you can capabilities and requirements are.
communicate with it through an interface
exposed by the service. For the music
service, this might allow you to pause,
Storing, Retrieving and
rewind, etc.
Exposing Data
CONTENT PROVIDER
A typical desktop operating system provides
Applications can store their data in files, an
a common file system that any application
SQLite database, or any other mechanism
can use to store and read files that can be
that makes sense. A content provider,
read by other applications. Android uses a
however, is useful if you want your
different system on Android, all application
application's data to be shared with other
data are private to that application.
applications. A content provider is a class
However, Android also provides a standard
that implements a standard set of methods to
way for an application to expose its private
let other applications store and retrieve the
data to other applications. This section
type of data that is handled by that content
describes the many ways that an application
provider.
can store and retrieve data, expose its data to
other applications, and also how you can
17
ANDROAID BROWSING SPEED
Files Network
You can store your files on the Don't forget that you can also use
device or on a removable storage the network to store and retrieve
medium. By default, other data.
applications cannot access these
files.
Security and Permissions in
Databases
Android
The Android APIs contain
support for SQLite. Your Android is a multi-process system, where
application can create and use a each application (and parts of the system)
private SQLite database. Each runs in its own process. Most security
database is private to the package between applications and the system is
that creates it. enforced at the process level through
standard Linux facilities, such as user and
Content Providers
group IDs that are assigned to applications.
18
ANDROAID BROWSING SPEED
19
ANDROAID BROWSING SPEED
certain functions.
20
ANDROAID BROWSING SPEED
21
ANDROAID BROWSING SPEED
The H
application DEMO
Tools Used
22
ANDROAID BROWSING SPEED
23
ANDROAID BROWSING SPEED
Program Code
24
ANDROAID BROWSING SPEED
OUTPUT
25
ANDROAID BROWSING SPEED
and they are implemented on top of Linux, software is disrupting the phone enough that the user
leveraging Linux user accounts to silo can’t uninstall it, they can reboot the phone
(optionally in safe mode, which stops nonsystem
applications. Android permissions are rights code from running) and then remove the software
given to applications to allow them to take before it has a chance to run again.
pictures, use the GPS, make phone calls, and
so on. When installed, applications are given Android’s runtime system tracks which permissions
a unique user identifier (UID); this is the each application has; these permissions are granted
either when the OS was installed or upon installation
familiar Unix UID seen on desktops and of the application by the user. In order to be installed,
servers. It is a small number like 1011 that is the application requests that the user approve its
unique on a given system and used by the permissions. Users will be hesitant to install
kernel to control access to files, devices, and applications that want access to personal data or the
dialer. Most won’t mind giving Internet or coarse
other resources. Applications will always run location access, or any permission that makes sense
as their given UID on a particular device, just for the application being installed.
like users always have their same UID on a
particular server but different UIDs on
unrelated systems. The UID of an application Developer’s Responsibilities
is used to protect its data, and developers , which stops non-system code from running)
and then remove the software
need to be explicit about sharing data with before it has a chance to run again.
other applications. Applications can entertain As a developer writing for Android, you will
users with graphics, play music, run native need to consider how you will keep users safe as
code and launch other programs without well as
needing any permissions. how to deal with constrained memory,
processing and battery power. You must protect
The need for permissions minimizes the impact of any data users
malicious software, unless a user unwisely grants input into their device with your application, and
powerful rights to dubious software. Preventing not allow malware to access the application’s
people from making bad but informed choices is special
beyond the scope of the security model—the permissions. How you achieve this is partly
permission model is designed to make the choice an related to which features of the platform you
informed one. The Android permission model is use.
extensible, and developers need to keep in mind what One of the trickiest big-picture things to
is reasonable for a phone user to understand when understand about Android is that every
defining new permissions for them. A confused user
application runs with a
can’t make good choices. To minimize the extent of
abuse possible, permissions are needed for programs different UID. Typically on a desktop every user
that perform potentially dangerous operations that the has a single UID and running any application
phone needs to support, such as the following: launches
runs that program as the users UID. On Android
Directly dialing calls (which may incur tolls) the system gives every application, rather than
every
Accessing private data person, its own UID. For example, when
launching a new program (say by starting an
Altering address books, e-mail, and so on Activity), the
new process isn’t going to run as the launcher
Generally a user’s response to annoying, buggy, or but with its own identity. It’s important that if a
malicious software is simply to uninstall it. If the
26
ANDROAID BROWSING SPEED
program is launched with bad developer) can ask to run with the same UID.
parametersAndroid requires developers to sign This allows developers to upgrade or patch their
their code. Android code signing usually uses software
self-signed certificates, which developers can easily, including copying data from existing
generate without anyone else’s assistance or versions. The signing is different than normal
permission. One reason for code signing is to Jar or
allow developers to update their application Authenticode signing however, as the actual
without creating complicated interfaces and identity of the developer isn’t necessarily being
permissions. Applications signed with the same validated
key (and therefore by the same developer) can by a third party to the device’s user . Developers
ask to run with the same UID. This allows earn a good reputation by making good products
developers to upgrade or patch their software .
easily, including copying data from existing their certificates prove authorship of their works.
versions. The signing is different than normal Developers aren’t trusted just because they paid
Jar or Authenticode the developer of that a
application has ensured it won’t little money to some authority. This approach is
harm the system or do something the phone’s novel, and may well succeed, but it wouldn’t be
user didn’t intend. Any program can ask technically difficult to add trusted signer rules or
Activity warnings to an Android distribution if it proved
Manager to launch almost any other application, desirable.
which runs with the application’s UID. Android Permissions Review
Applications need approval to do things their
owner might object to, like sending SMS
Fortunately, the untrusted entry points to your messages, using
application are limited to the particular platform the camera or accessing the owner’s contact
features database. Android uses manifest permissions to
you choose to use and are secured in a consistent track what
way. Android applications don’t have a simple the user allows applications to do. An
main application’s permission needs are expressed in
function that always gets called when they start. its
Instead, their initial entry points are based on AndroidManifest.xml and the user agrees to
registering Activites, Services, them upon install. When installing new
BroadcastReceivers or ContentProviders with software, users .
the system. After a brief have a chance to think about what they are doing
refresher on Android Permissions and Intents we and to decide to trust software based on reviews,
will cover securely using each of these features. the
developer’s reputation, and the permissions
Android requires developers to sign their code. required. Deciding up front allows them to focus
Android code signing usually uses self-signed on their
certificates, which developers can generate goals rather than on security while using
without anyone else’s assistance or permission. applications. Permissions are sometimes called
One reason “manifest
for code signing is to allow developers to update permissions” or “Android permissions” to
their application without creating complicated distinguish them from file permissions.
interfaces and permissions. Applications signed
with the same key (and therefore by the same To be useful, permissions must be associated
with some goal that the user understands. For
example, an
27
ANDROAID BROWSING SPEED
28
ANDROAID BROWSING SPEED
Manifest permissions like the one above have a users about the need for
few key properties. Two text descriptions are these permissions on
required: install.
a short text label, and a longer description used
on installation. An icon for the permission can Signature These permissions can
also be only be granted to other
provided (but isn’t in the example above). All applications signed
permissions must also have a name which is with the same key as
globally this program. This
unique. The name is the identifier used by allows secure
programmers for the permission and is the first coordination
parameter to without publishing a
Context.checkPermission. Permissions also have public interface.
a protection level (called protectionLevel as
shown SignatureOrSystem Similar to Signature
above). except that programs
There are only four protection levels for on the system
permissions
29
ANDROAID BROWSING SPEED
Developer Tip: Your application might be used sure you actually have a service or some data
by people who don’t speak your you want to expose not to just interactive users
language. Be sure to internationalize the label but to
and description properties of any other programs.
new permission you create. Have someone both
technical and fluent in the target Adding permissions should be avoided using a
languages review to ensure translations are little cleverness whenever possible. For example
accurate. you
In addition to reading and writing data, many could define an Activity that added a new item
permissions allow applications to call upon to the shopping list. When an application called
system startActivity and provided an Intent to add a new
services or start Activities with security sensitive shopping list item, the Activity could display the
results. For example, with the right permission a data
video provided and ask for confirmation from the user
game can take full control of the screen and instead of requiring permission enforcement.
obscure the status bar, or a dialer can cause the This
phone to keeps the system simple for users and saves you
dial a number without prompting the user. development effort. A requirement for Activities
Creating New Manifest Permissions that
Applications can define their own permissions if immediately altered the list upon starting would
they intend other applications to have make the permission approach necessary.
programmatic
access to them. Using a manifest permission
allows the end user to decide which programs
get access,
rather than having the developer just assume GOOGLE ANROID JUST NOT PHONES
access is acceptable. For example, an application The first phone using Google's Android
that operating system will debut Tuesday, a
manages a shopping list application could define model from T-Mobile, and more are set
a permission named come. But some Android partners say the
“com.isecpartners.ACCESS_SHOPPING_LIST
software will use more broadly than just
” (ACCESS_SHOPPING_LIST for short). If the
application defines an exclusive ShoppingList
phones.
object then there is now precisely one instance "We're starting to see Android get designed
of in on devices that extend way beyond the
ShoppingList and the phone--things that might go in the
ACCESS_SHOPPING_LIST permission is automobile or things that might go in the
needed to access it. The permission home," said John Bruggeman, chief
would be required for callers trying to see or marketing officer at Wind River Systems, a
update the shopping list. Done correctly, only Google ally that helps phone makers build
the and customize Android for their phone
programs that declare they use this permission hardware.
could access the list, giving the user a chan ce to
It's not clear yet whether Google shares this
either
consent or prevent inappropriate access. When
broader Android ambition--the emphasis
defining permissions keep them clear and today is for mobile phones--but extending
simple, make into new areas could increase both the
prominence and competitive threat of the
30
ANDROAID BROWSING SPEED
project. However, projects that spread wider Wind River is a notable member of the 34-
also can be stretched thinner, and company Open Handset Alliance that
advantages such as broader developer Google gathered to build, support, and use
interest could be offset by incompatibilities Android.
other drawbacks. Wind River has years of experience with so-
Bruggeman declined to share specifics about called embedded operating systems, starting
which Internet-connected devices might with its own VxWorks and eventually
employ the operating system, but he did extending to include Linux, which underlies
mention TVs and set-top boxes as well Android. It's also got a lot of customers, and
as cars. And he was confident some will to beef up its Android support services,
arrive next year. Wind River acquired mobile Linux
firm Mizi Research in August for a price it
said could reach $16 million.
The Android business "was significant
enough for us that we acquired a company
so we had additional resources," Bruggeman
said. Mizi is based in Korea, as are LG
Electronics and Samsung, two notable phone
makers in the Open Handset Alliance.
Much depends on how Google sees the
effort. It's got a lot of engineering resources,
of course, but perhaps more important, it has
a powerful brand, some pull with the
programmers it's enlisting to write Android
applications, and a strong will to spread
Internet access far and wide.
But embedded computing is a tough nut to
crack. Wind River, along with MontaVista
Software and many others, have tried to
spread Linux to embedded devices. And
while they've had significant success, there's
a lot of fragmentation, with nothing as
universal as Windows or as standardized as
the iPhone.
Google has come up with a prominent brand
and strong developer program for Android,
"I don't want to pre-announce any design which brings compatibility issues to the
wins," he said. "I think you'll see them in fore. With a brand comes an implicit
2009. I would be shocked if you didn't." promise that everything sporting the brand
Google didn't immediately responds to a works well together. The broader the
request for comment. Android brand spreads, the more
Of course, Android is mostly open-source complicated it gets. For example, what if a
software, so there's nothing stopping people programmer wants to take advantage of the
from doing anything they want with it. But considerable computing horsepower in
31
ANDROAID BROWSING SPEED
32
ANDROAID BROWSING SPEED
33
ANDROAID BROWSING SPEED
34
ANDROAID BROWSING SPEED
35
ANDROAID BROWSING SPEED
36
ANDROAID BROWSING SPEED
37
ANDROAID BROWSING SPEED
38
ANDROAID BROWSING SPEED
39
ANDROAID BROWSING SPEED
Mobile geeks over at PocketNow have taken Chrome’s speedy Javascript engine dubbed
the claim with a grain of salt and decided to V8, resulting in up to three times
run a real-life browser test pitting a Froyo performance boost in Android 2.2’s
device against the iPhone 3GS running Javascript performance over the previous
iPhone OS 4 with mobile Safari and the Android version, according to Google.
HD2 running Opera Mobile 10.
Applications:
The test included Flash sites and a series of
simultaneous page loads rather than raw Due to its Open Source nature, anyone (who
Javascript tests that tell little about a knows how to do it) can create apps for
Android. It is being taught at Harvard now.
browser’s performance in real-life scenarios.
Google has introduced its own apps, too e.g.
As you can see from the video included Google Voice, Google Goggles and Google
below, Android 2.2’s web browser is pretty Shopper etc. Third party apps are also in the
fast.Safari list, like Twitter, Facebook etc.
The iPhone 3GS did load the Pocketnow site You can download apps and games by
ahead of other browsers, but that’s because visiting Android’s app market. Find your
it didn’t have to retrieve and render Flash required apps by browsing categories, top
parts. Although other browsers rendered rated and featured apps. There are a lot of
Flash sections with ease, scrolling around different kinds of apps that can attract you
including games, sports, media, news, health
became a “really choppy” experience as a
and entertainment.
result. However, the same test but without
Flash 10.1 Beta installed on Android 2.2 Some must have apps include Swype,
shows Android’s clear lead in page loading AppMonster, Seesmic, Job Centre Plus,
and rendering speed over the Iphones AppBrain Market Sync, Google Sky Map,
3Gs.Check it out in the below video. Google Goggles, Task Manager, Skyfire 2.0
and RAC Traffic. There are certain games
Google unveiled Android 2.2 at their annual that you should download in your Android
developer conference dubbed Google I/O phone like Bebbled, The Red Stone, Sketch
that ran last week. The software comes with Online, Newton, Gem Miner, Replica Island
and Titres.
40
ANDROAID BROWSING SPEED
41
ANDROAID BROWSING SPEED
CONCLUSION
•Android is open to all: industry,
developers and users
• Participating in many of the successful
open
source projects
• Aims to be as easy to build for as the
web.
• Google Android is stepping into the next
level
of Mobile Internet
42