0% found this document useful (0 votes)
143 views

Nainesh Android Report

This document will help you a lot to know intro of android......if you have any queries than mail me at ::[email protected]

Uploaded by

uniquely_1
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views

Nainesh Android Report

This document will help you a lot to know intro of android......if you have any queries than mail me at ::[email protected]

Uploaded by

uniquely_1
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 42

ANDROAID BROWSING SPEED

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

Android is a software platform and operating system


for mobile devices, based on the Linux operating

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

What is Android? control the platform. Google will continue to make


money from online advertising, but now seeks to
Android is a software platform and operating system
for mobile devices, based on the Linux . extend this onto mobile devices.
With Android being part of the Open Handset
operating system, developed by Google and later the
Open Handset Alliance. It allows developers to Alliance, the other members of the alliance will

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.

HTC was First to deliver ANDROID

4
ANDROAID BROWSING SPEED

Open Handset Alliance (OHA)

it is consortium of several companies

5
ANDROAID BROWSING SPEED

ANDROID ARCHITECTURE

Android is a complete software stack


for mobile devices such as cell
phones, PDAs and high end MP3
players. The software stack is split
into four layers:

 The application layer


 The application framework
 The libraries and runtime
 The kernel

Cell phone users obviously work with


applications in the application layer.
Android developers write those
applications using the application
framework. Unlike many embedded
operating environments, Android
applications are all equal -- that is, the
applications that come with the phone
are no different than those that any
developer writes. 

The framework is supported by


numerous open source libraries such
as open ssl, sqlite and libc. It is also
6
ANDROAID BROWSING SPEED

supported by the Android core API for writing applications -- in Java


libraries -- more on that in a second. using the Android core libraries. 
At the bottom of the stack sits the
Linux 2.6 kernel, providing the low That's right, Android applications are
level hardware interfaces that we all almost exclusively written in Java.
expect from a kernel. This is a Unix The Android core library is a big .jar
based system -- that is, the Unix C file that is supported by the Dalvik
APIs are available -- but don't expect Virtual Machine -- a fast and efficient
to drop to a shell and start executing JVM work-alike that enables java-
shell scripts with your old friends coded applications to work on the
grep and awk. Most of the Unix Android cell phone. This is similar to,
utilities are simply not there. Instead but not the same as using Sun's JVM
Android supplies a well thought out directly. 

7
ANDROAID BROWSING SPEED

8
ANDROAID BROWSING SPEED

to security constraints enforced by the


framework). 

Underlying all applications is a set of


services and systems, including:
APPLICATION::
 A rich and extensible set
Android will ship with a set of core
applications including an email client, of Views that can be used to build an
SMS program, calendar, maps, application, including lists, grids, text
browser, contacts, and others. All
boxes, buttons, and even an
applications are written using the Java
programming language. embeddable web browser
 Content Providers that enable
applications to access data from other
APPLICATION FRAMEWORK::
applications (such as Contacts), or to
By providing an open development share their own data
platform, Android offers developers
the ability to build extremely rich and  A Resource Manager,
innovative applications. Developers providing access to non-code
are free to take advantage of the resources such as localized strings,
device hardware, access location
information, run background services, graphics, and layout files
set alarms, add notifications to the  A Notification Manager that
status bar, and much, much more. enables all applications to display
Developers have full access to the custom alerts in the status bar
same framework APIs used by the
 An Activity Manager that
core applications. The application
architecture is designed to simplify manages the lifecycle of applications
the reuse of components; any and provides a common navigation
application can publish its capabilities backstack.
and any other application may then
make use of those capabilities (subject

9
ANDROAID BROWSING SPEED

LIBRARIES o a modern web browser


engine which powers
Some of the core libraries are listed both the Android
below: browser and an
embeddable web view
 System C library 
o a BSD-derived
 SGL
implementation of the
o the underlying 2D
standard C system library
graphics engine
(libc), tuned for
embedded Linux-based
 3D libraries
devices
o an implementation based
 Media Libraries on OpenGL ES 1.0 APIs;
 based on Packet the libraries use either
Video's Open hardware 3D acceleration
CORE; the (where available) or the
libraries support included, highly
playback and optimized 3D software
recording of many pasteurizer
popular audio and
video formats, as  FreeType
well as static o bitmap and vector font
image files, rendering
including MPEG4,
H.264, MP3,  SQLite
AAC, AMR, JPG, o a powerful and
and PNG lightweight relational
database engine available
 Surface Manager to all applications
o manages access to the
display subsystem and
seamlessly composites
2D and 3D graphic layers
from multiple
applications ANDROID RUNTIME
 LibWebCore

10
ANDROAID BROWSING SPEED

Android includes a set of core The Dalvik VM relies on the Linux


kernel for underlying functionality
libraries that provides most of the
such as threading and low-level
functionality available in the core memory management.
libraries of the Java programming
language.
LINUX KERNEL
Every Android application runs in its
own process, with its own instance of Android relies on Linux version 2.6

the Dalvik virtual machine. Dalvik for core system services such as

has been written so that a device can security, memory management,

run multiple VMs efficiently. The process management, network stack,

Dalvik VM executes files in the and driver model. The kernel also acts

Dalvik Executable (.dex) format as an abstraction layer between the

which is optimized for minimal hardware and the rest of the software

memory footprint. stack.

 The VM is register-based, and runs


classes compiled by a Java language
compiler that have been transformed
into the .dex format by the included
"dx" tool.

11
ANDROAID BROWSING SPEED

Android Structure of SDK

apache
license

Binary code in this release; source code released within 2008??

Debuging LINUX ONQUER


from
OHA
Project

File System

12
ANDROAID BROWSING SPEED

Native shared libraries; *.so files

13
ANDROAID BROWSING SPEED

PERFORMANCE

14
ANDROAID BROWSING SPEED

Building blocks to an Android these screens would be implemented as an


activity. Moving to another screen is
application
accomplished by a starting a new activity. In
some cases and activity may return a value
There are four building blocks to an Android
to the previous activity -- for example an
application:
activity that lets the user pick a photo would
return the chosen photo to the caller.
ACTIVITIES UI component
typically
corresponding to one Intent and Intent Filters
screen.
BroadcastReceivers Respond to broadcast
Intents. Android uses a special class called Intent to
Services Faceless tasks that run
in the
move from screen to screen. Intent describes
Background. what an application wants done. The two
ContentProviders Enable applications to
share data. most important parts of the intent data
structure are the action and the data to act
Activity upon. Typical values for action are MAIN

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.

composed of Views and respond to events.


Most applications consist of multiple
screens. For example, a text messaging There is a related class called an Intent
application might have one screen that Filter. While an intent is effectively a
shows a list of contacts to send messages to, request to do something, an intent filter is a
a second screen to write the message to the description of what intents an activity (or
chosen contact, and other screens to review Broadcast Receiver, see below) is capable of
old messages or change settings. Each of handling. An activity that is able to display

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

request data from other applications that A content provider is a optional


expose their data. component of an application that
exposes read/write access to an
Android provides the following mechanisms
application's private data, subject
for storing and retrieving data:
to whatever restrictions it wants
to impose. Content providers
implement a standard request
Preferences
syntax for data, and a standard
A lightweight mechanism to store access mechanism for the
and retrieve key/value pairs of returned data. Android supplies a
primitive data types. This is number of content providers for
typically used to store application standard data types, such as
preferences. personal contacts.

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

Additional finer-grained security features statically in that application, so they can be


are provided through a "permission" known up-front at install time and will not
mechanism that enforces restrictions on the change after that.
specific operations that a particular process
Application Signing
can perform, and per-URI permissions for
granting ad-hoc access to specific pieces of
All Android applications (.apk files) must be
data.
signed with a certificate whose private key
is held by their developer. This certificate
System Architecture
identifies the author of the application. The
A central design point of the Android certificate does not need to be signed by a
security architecture is that no application, certificate authority: it is perfectly
by default, has permission to perform any allowable, and typical, for Android
operations that would adversely impact applications to use self-signed certificates.
other applications, the operating system, or The certificate is used only to establish trust
the user. This includes reading or writing the relationships between applications, not for
user's private data such as contacts or e- wholesale control over whether an
mails, reading or writing another application can be installed. The most
application's files, performing network significant ways that signatures impact
access, keeping the device awake, etc. security is by determining who can access
signature-based permissions and who can
An application's process is a secure sandbox.
share user IDs.
It can't disrupt other applications, except by
explicitly declaring the permissions it needs User IDs and File Access
for additional capabilities not provided by
Each Android package (.apk) file installed
the basic sandbox. These permissions it
on the device is given its own unique Linux
requests can be handled by the operating in
user ID, creating a sandbox for it and
various ways, typically by automatically
preventing it from touching other
allowing or disallowing based on certificates
applications (or other applications from
or by prompting the user. The permissions
touching it). This user ID is assigned to it
required by an application are declared

19
ANDROAID BROWSING SPEED

when the application is installed on the  When starting an activity, to


device, and remains constant for the prevent applications from
duration of its life on that device. launching activities of other
applications.
Using Permissions
 Both sending and receiving
A basic Android application has no broadcasts, to control who
permissions associated with it, meaning it can receive your broadcast or
can not do anything that would adversely who can send a broadcast to
impact the user experience or any data on you.
the device. To make use of protected  When accessing and
features of the device, you must include in operating on a content
your AndroidManifest.xml one or more <uses- provider.
permission> tags declaring the permissions
 Binding or starting a service
that your application needs.

The permissions provided by the Android Declaring and Enforcing Permissions


system can be found at Manifest.
permission. Any application may also
define and enforce its own permissions, so To enforce your own permissions, you must
first declare them in your AndroidManifest.xml
this is not a comprehensive list of all using one or more <permission> tags.
possible permissions.

A particular permission may be enforced at


The <protection Level> attribute is
a number of places during your program's
required, telling the system how the user is
operation:
to be informed of applications requiring the
 At the time of a call into the permission, or who is allowed to hold that

system, to prevent an permission, as described in the linked

application from executing documentation.

certain functions.

20
ANDROAID BROWSING SPEED

The <permission Group> attribute is should be a couple sentences describing


optional, and only used to help the system what the permission allows a holder to do.
display permissions to the user. You will Our convention for the description is two
usually want to set this to either a standard sentences, the first describing the
system group (listed in permission, the second warning the user of
android.Manifest.permission_group) or in what bad things can happen if an application
more rare cases to one defined by yourself. is granted the permission.
It is preferred to use an existing group, as
this simplifies the permission UI shown to
the user.

Note that both a label and description should


be supplied for the permission. These are
string resources that can be displayed to the
user when they are viewing a list of
permissions (android:label) or details on a
single permission ( android:description). The
label should be short, a few words
describing the key piece of functionality the GUIs Layouts
permission is protecting. The description

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

Android is based on the Linux kernel, which


provides a security model. Android has
Android’s Security Model abstractions that are unique to it, however,

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

application needs the READ_CONTACTS


permission to read the user’s address book. A
contact
manager app needs the READ_CONTACTS
permission, but a block stacking game shouldn’t
Keeping the model simple, it’s possible to
secure the use of all the different Android inter-
process
communication (IPC) mechanisms with just a
single kind of permission. Starting Activities,
starting or
connecting to Services, accessing
ContentProviders, sending and receiving
broadcast Intents, and
invoking Binder interfaces can all require the
same permission. Therefore users don’t need to
understand more than “My new contact manager
needs to read contacts”.

Figure shows an example permission definition.


Note that the description and label are resources
to
aid in localizing the application.
<permission
xmlns:android="http://schemas.android.com/apk
/res/android"
android:name="com.isecpartners.android.ACCE
SS_SHOPPING_LIST"
android:description="@string/access_perm_desc
"
android:protectionLevel="normal"
android:label="@string/access_perm_label">
</permission>
Figure 2 Custom permission definition in an
AndroidManifest.xml file.

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

image also qualify for access. This allows


TABLE programs on custom Android systems
Normal Permissions for to also get the permission. This protection is to
application features help integrate system
whose consequences builds and won’t typically be needed by
are minor developers.
like VI BRATE which
lets applications vibrate
the device. Suitable
for granting rights not
generally of keen If you try to use an interface which you don’t
interest to users, users have permissions for you will probably receive a
can SecurityException. You may also see an error
review but may not be message logged indicating which permission
explicitly warned. you need to
Dangerous Permissions like enable. If your application enforces permissions
WRITE_SETTINGS or you should consider logging an error on failure
SEND_SMS are so that
dangerous developers calling your application can more
as they could be used easily diagnose their problems. Sometimes
to reconfigure the (aside from
device or incur tolls. the lack of anything happening) permission
Use failures are silent. The platform itself neither
this level to mark alerts users
permissions users will when permission checks fail, nor allows
be interested in or granting of permissions to applications after
potentially surprised installation.
by. Android will warn

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

an Intel mobile Internet device (MID) for a


game--would that work on an comparatively
feeble feature phone with a smaller screen, Features
no keyboard, a low-capacity battery, and  Application
inferior graphics?
One convenient element Android brings to framework enabling reuse and
the compatibility challenge is that software replacement of components
doesn't run on the Linux component of the
operating system. Instead, it runs on a Java  Dalvik virtual
layer from Google called Dalvik. That machine optimized for mobile
means programmers writing applications for
Android need not concern themselves with
devices
the underlying hardware, such as whether a
device is running an ARM-based processor  Integrated browser based on
or an x86. the open source Web Kit engine
Here again, though, there are some
compatibility issues. Sun Microsystems'
 Optimized graphics powered
Java, already used widely in mobile phones,
is a slightly different foundation. Software by a custom 2D graphics library; 3D
may transfer more easily from one domain graphics based on the OpenGL ES
to another, but there won't be any guarantees 1.0 specification (hardware
of compatibility. acceleration optional)
One of the big elements of the Android sales
pitch is openness, though, and that could
have appeal in other markets.
 SQLite for structured data
Perhaps a developer might want to sell an storage
application that shows nearby Flickr's
geotagged photos on in-dash navigation  Media support for common
device without having to obtain General audio, video, and still image formats
Motors' permission first. Perhaps a user
(MPEG4, H.264, MP3, AAC, AMR,
might want to download a TV game
from Google's Android Market without JPG, PNG, GIF)
requiring clearance from Sony.
And of course, people might want to use  GSM Telephony (hardware
Google to perform an online search. Which dependent)
is why Yahoo, Microsoft, and Nokia
probably shouldn't be too complacent about
the possibility of Android might spread  Bluetooth, EDGE, 3G, and
beyond phones. WiFi (hardware dependent)

 Camera, GPS, compass, and


accelerometer (hardware dependent)

32
ANDROAID BROWSING SPEED

 Rich development According to NPD Group, not only


environment including a device are Android-powered devices now
emulator, tools for debugging, outselling iPhone (as another report
memory and performance profiling, indicated earlier this week), but
and a plugin for the Eclipse IDE
they’re also now besting BlackBerry,
making Android the top selling
 Multi touch: Android supports mobile OS during the second quarter
multi touch technology in the U.S.

 It's not a stunning surprise, but


 Multi tasking: It is available by the Android OS has knocked
Android. Apple out of the number 2 slot
and slid just behind RIM.
Nice-to-haves: Android automatically   NPD says first quarter sales
checks and repairs the file system on give   Android has 28% while
SD cards and allows third-party apps
Apple has 21%.
to indicate to the Android system
what hardware features they require in NPD has the race at Android – 33%,
order to function properly. Android
RIM – 28%, and Apple – 22% for the
checks these requirements when you
download the app from the Android period, noting that it’s the first time
Market, allowing the installation only since Q4 2007 that the BlackBerry
if the required hardware is present.  maker hasn’t been number one. RIM
is pinning much of its hopes on
getting back on top with its new
BlackBerry 6 operating system and
Market Research the BlackBerry Torch smartphone, the
latter of which was revealed
yesterday.

33
ANDROAID BROWSING SPEED

the Motorola Droid as the biggest and


most immediate culprit.

Android OS Popularity Grows by


Among those who currently own a
smart phone, ChangeWave found that
Leaps and Bounds
4% say they’re currently using
Google’s Android operating system,
which is  a 3pt jump since their
Google’s Android mobile operating survey in September. They also
system has been out on the streets for discovered that 21% of those planning
more than a year and has changed the to buy a smart phone in the next 90
smart phone days say they would rather have the
market! ChangeWave’s December of Android OS on their new phone,
4,068 consumers found that the which is a gigantic 15pt jump in just
Android operating system causing a three months.
stir in the smart phone market with

34
ANDROAID BROWSING SPEED

The iPhone OS X remains the number


one choice for operating systems but
has fallen 4pts.
Three months ago, Android OS was
tied for last place in consumer’s
preferences among all the major
mobile operating systems. However,
since then it has exploded into second
place just behind the iPhone OS X.

35
ANDROAID BROWSING SPEED

12pt jump in future buying, which is


the first increase for Motorola in a
The Motorola Droid stands out as the ChangeWave consumer smart phone
biggest and the beneficiary of the survey.
growing demand for the Android OS.
Motorola is showing an enormous

36
ANDROAID BROWSING SPEED

37
ANDROAID BROWSING SPEED

38
ANDROAID BROWSING SPEED

Browser speed test: iPhone OS


4 versus Android 2.2
It’s official, Android 2.2 code-named Froyo
claims the crown of the speediest web
browsing software out there – for now,
because we have yet to see how mobile
Safari performs on the upcoming iPhone HD
hardware.

Google claims that Android 2.2 features the


fastest web browser of any other smartphone
platform.

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.

iPhone OS 4 vs Android 2.2 vs Windows Google today has unveiled the much


awaited Android 2.2 OS at the I/O 2010
Phone 7 – The Inevitable Comparison conference held in San Francisco.  Android
2.2 edges out bothiPhone OS 4 and
Windows Phone 7. 

40
ANDROAID BROWSING SPEED

Sciphone_N19_Google with WIFI

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

You might also like