Android is a Linux-based operating system designed primarily for touch screen mobile devices such as smart phones and tablet computers. Initially developed by Android, Inc., which Google backed financially and later bought in 2005, Android was unveiled in 2007 along with the founding of the Open Handset Alliance: a consortium of hardware, software, and telecommunication companies devoted to advancing open standards for mobile devices. The first Android-powered phone was sold in October 2008.
Android is open source and Google releases the code
under the Apache License. This open-source code and permissive licensing
allows the software to be freely modified and distributed by device
manufacturers, wireless carriers and enthusiast developers. Additionally, Android
has a large community of developers writing applications ("apps")
that extend the functionality of devices, written primarily in a customized
version of the Java programming
language. In October 2012, there were approximately 700,000 apps available
for Android, and the estimated number of applications downloaded
from Google Play, Android's primary app store, was 25 billion. A developer
survey conducted in April–May 2013 found that Android is the most popular
platform for developers, used by 71% of the mobile developer population.
These factors have contributed towards making Android the
world's most widely used smart phone
platform, overtaking symbian in the fourth quarter of
2010, and the software of choice for technology companies who require a
low-cost, customizable, lightweight operating system for high
tech devices without developing one from scratch. As a result,
despite being primarily designed for phones and tablets, it has seen additional
applications on televisions, games consoles, digital cameras and
other electronics. Android's open nature has further encouraged a large
community of developers and enthusiasts to use the open-source code as a
foundation for community-driven projects, which add new features for advanced
users or bring Android to devices which were officially released running
other operating systems.
Android's share of the global smart phone market, led by
Samsung products, was 64% in March 2013. In July 2013 there were 11,868
models of Android device, scores of screen sizes and eight OS versions
simultaneously in use. The operating system's success has made it a target
for patent litigation as part of the so-called "smart phone wars"
between technology companies. As of May 2013, 48 billion apps have been
installed from the Google Play store, and as of September 3, 2013, 1
billion Android devices have been activated.
History
Android,
Inc. was founded in Palo Alto, California in October 2003 by Andy Rubin (co-founder
of Danger), Rich Miner (co-founder
of Wildfire Communications, Inc.), Nick Sears (once VP at T-Mobile), and Chris White (headed
design and interface development at WebTV) to develop, in Rubin's words
"smarter mobile devices that are more aware of its owner's location and
preferences". The early intentions of the company were to develop an
advanced operating system for digital cameras, when it was realised that
the market for the devices was not large enough, and diverted their efforts to
producing a smartphone operating system to rival those of Symbian and Windows
Mobile (Apple's iPhone had not been released at the time).
Despite the past accomplishments of the founders and early employees, Android
Inc. operated secretly, revealing only that it was working on software for
mobile phones. That same year, Rubin ran out of money. Steve Perlman,
a close friend of Rubin, brought him $10,000 in cash in an envelope and refused
a stake in the company.
Google acquired
Android Inc. on August 17, 2005, making it a wholly owned subsidiary of Google.
Key employees of Android Inc., including Rubin, Miner and White, stayed at the
company after the acquisition. Not much was known about Android Inc. at
the time, but many assumed that Google was planning to enter the mobile phone
market with this move. At Google, the team led by Rubin developed a mobile
device platform powered by the Linux kernel. Google marketed the platform
to handset makers and carriers on the promise of providing a
flexible, upgradable system. Google had lined up a series of hardware component
and software partners and signalled to carriers that it was open to various
degrees of cooperation on their part.
Speculation
about Google's intention to enter the mobile communications market continued to
build through December 2006. Reports from the BBC and the Wall
Street Journal noted that Google wanted its search and applications on
mobile phones and it was working hard to deliver that. Print and online media
outlets soon reported rumours that Google was developing a
Google-branded handset. Some speculated that as Google was defining
technical specifications, it was showing prototypes to cell phone manufacturers
and network operators. In September 2007,InformationWeek covered
an Evalueserve study reporting that Google had filed several patent
applications in the area of mobile telephony.
On
November 5, 2007, the Open Handset Alliance, a consortium of
technology companies including Google, device manufacturers such
as HTC, Sony and Samsung, wireless carriers such as Sprint
Nextel and T-Mobile, and chipset makers such
as Qualcomm and Texas Instruments, unveiled itself, with a goal
to develop open standards for mobile devices. That day, Android
was unveiled as its first product, a mobile device platform built on
the Linux kernel version 2.6. The first commercially available
phone to run Android was the HTC Dream, released on October 22, 2008.
In
2010, Google launched its Nexus series of devices—a line of
smartphones and tablets running the Android operating system, and built by a
manufacturer partner. HTC collaborated with Google to release the first Nexus
smartphone, the Nexus One. The series has since been updated with
newer devices, such as the Nexus 4 phone
and Nexus 10 tablet, made by LG and Samsung
respectively. Google releases the Nexus phones and tablets to act as
their flagship Android devices, demonstrating Android's latest
software and hardware features. On March 13, 2013, it was announced
by Larry Page in a blog post that Andy Rubin had moved from the
Android division to take on new projects at Google. He was replaced
by Sundar Pichai, who also continues his role as the head of Google's
Chrome division,[44] which develops Chrome OS.
Since
2008, Android has seen numerous updates which have incrementally
improved the operating system, adding new features and fixing bugs in previous releases.
Each major release is named in alphabetical order after a dessert or sugary
treat; for example, version 1.5 Cupcake was followed by
1.6 Donut. The latest released version is 4.3 Jelly Bean;
however, version 4.4 KitKat was announced on September 3,
2013.
Platform usage
This chart provides data
about the relative number of devices accessing the Play Store recently and
running a given version of the Android platform as of October 2, 2013
Version
|
Code name
|
Release date
|
API level
|
Distribution
|
4.4
|
KitKat
|
TBA
|
TBA
|
0%
|
4.3
|
Jelly Bean
|
July 24, 2013
|
18
|
1.5%
|
4.2.x
|
Jelly Bean
|
November 13, 2012
|
17
|
10.6%
|
4.1.x
|
Jelly Bean
|
July 9, 2012
|
16
|
36.5%
|
4.0.3–4.0.4
|
Ice Cream Sandwich
|
December 16, 2011
|
15
|
20.6%
|
3.2
|
Honeycomb
|
July 15, 2011
|
13
|
0.1%
|
3.1
|
Honeycomb
|
May 10, 2011
|
12
|
0%
|
2.3.3–2.3.7
|
Gingerbread
|
February 9, 2011
|
10
|
28.5%
|
2.3–2.3.2
|
Gingerbread
|
December 6, 2010
|
9
|
0%
|
2.2
|
Froyo
|
May 20, 2010
|
8
|
2.2%
|
2.0–2.1
|
Eclair
|
October 26, 2009
|
7
|
0%
|
1.6
|
Donut
|
September 15, 2009
|
4
|
0%
|
1.5
|
Cupcake
|
April 30, 2009
|
3
|
0%
|
What is Android?
Android
is a stack of software for mobile devices which includes an Operating System,
middleware and some key applications. The application executes within its own
process and its own instance of Dalvik Virtual Machine. Many Virtual Machines
run efficiently by a DVM device. DVM executes Java languages byte code which
later transforms into .dex format files.
Describe the APK format?
The
(Android Packaging Key) APK file is compressed format of the
AndroidManifest.xml file, application code (.dex files), resource files, and
other files. A project is compiled into a single .apk file.
What is an activity?
The
building block of the user interface is the activity. They're in a long-running
conversation with the user and may remain active, even when idle, as long as
the conversation continues. In terms of desktop development, an Activity is
equivalent to a Form.
What are the different phases of the Activity life cycle?
As an activity
transitions from state to state, it is notified of the change by calls to the
following protected methods:
1) void onCreate(Bundle savedInstanceState)
2) void onStart()
3) void onRestart()
4) void onResume()
5) void onPause()
6) void onStop()
7) void onDestroy()
Taken together, these seven methods define the entire lifecycle of an activity.
protected void onCreate(Bundle savedInstanceState):
This method is called when this activity is initially created. It provides a place to create views, bind data to lists, and perform other operations whose results must exist until onDestroy() is called. Also, this method is called with an android.os.Bundle instance that contains this activity's previously saved state, if this state was saved. Otherwise, null is passed. Finally, onCreate() is always followed by onStart().
protected void onStart():
This method is called when this activity is becoming visible to the user. Also, onStart() is followed by onResume() if this activity is coming to the foreground, or onStop() if this activity is becoming hidden .
protected void onResume():
This method is called when this activity can start to interact with the user -- this activity is now at the top of the activity stack and receives focus. Also, onResume() is always followed by onPause().
protected void onPause():
This method is called when the OS is about to resume a previous activity. The onPause() method is typically used to commit unsaved changes to persistent storage, and stop animations and other time-consuming processor activities. This method should run quickly because the next activity cannot be resumed until onPause() returns. Finally, onPause() is followed by onResume() if this activity is returning to the foreground, or onStop() if this activity is becoming hidden.
protected void onRestart():
This method is called after this activity has been stopped and prior to it being restarted. Also, onRestart() is always followed by onStart().
protected void onDestroy():
This method is called when this activity is being terminated. After this method returns, the process hosting this activity is killed by the OS
1) void onCreate(Bundle savedInstanceState)
2) void onStart()
3) void onRestart()
4) void onResume()
5) void onPause()
6) void onStop()
7) void onDestroy()
Taken together, these seven methods define the entire lifecycle of an activity.
protected void onCreate(Bundle savedInstanceState):
This method is called when this activity is initially created. It provides a place to create views, bind data to lists, and perform other operations whose results must exist until onDestroy() is called. Also, this method is called with an android.os.Bundle instance that contains this activity's previously saved state, if this state was saved. Otherwise, null is passed. Finally, onCreate() is always followed by onStart().
protected void onStart():
This method is called when this activity is becoming visible to the user. Also, onStart() is followed by onResume() if this activity is coming to the foreground, or onStop() if this activity is becoming hidden .
protected void onResume():
This method is called when this activity can start to interact with the user -- this activity is now at the top of the activity stack and receives focus. Also, onResume() is always followed by onPause().
protected void onPause():
This method is called when the OS is about to resume a previous activity. The onPause() method is typically used to commit unsaved changes to persistent storage, and stop animations and other time-consuming processor activities. This method should run quickly because the next activity cannot be resumed until onPause() returns. Finally, onPause() is followed by onResume() if this activity is returning to the foreground, or onStop() if this activity is becoming hidden.
protected void onRestart():
This method is called after this activity has been stopped and prior to it being restarted. Also, onRestart() is always followed by onStart().
protected void onDestroy():
This method is called when this activity is being terminated. After this method returns, the process hosting this activity is killed by the OS
What is an AndroidManifest file?
Applications
declare their components in a manifest file that's bundled into the Android
package, the .apk file that also holds the application's code, files, and
resources. The manifest is a structured XML file and is always named
AndroidManifest.xml for all applications. It is also used for naming any
libraries the application needs to be linked against (besides the default
Android library) and identifying any permission the application expects to be
granted.
What are Intent filters?
Activities
and intent receivers include one or more filters in their manifest to describe what
kinds of intents or messages they can handle or want to receive. An intent
filter lists a set of requirements, such as data type, action requested, and
URI format, that the Intent or message must fulfill. For Activities, Android
searches for the Activity with the most closely matching valid match between
the Intent and the activity filter. For messages, Android will forward a
message to all receivers with matching intent filters.
What language does Android support for application development?
Android
applications are written using the Java programming language.
What's the difference between a file, a class and an activity in
android?
File - It is a block of
arbitrary information, or resource for storing information. It can be of any
type.
Class - It’s a compiled form of .Java file . Android finally used this .class files to produce an executable apk
Activity - An activity is the equivalent of a Frame/Window in GUI toolkits. It is not a file or a file type it is just a class that can be extended in Android for loading UI elements on view.
Class - It’s a compiled form of .Java file . Android finally used this .class files to produce an executable apk
Activity - An activity is the equivalent of a Frame/Window in GUI toolkits. It is not a file or a file type it is just a class that can be extended in Android for loading UI elements on view.
What is the significance of the .dex files?
Android
programs are compiled into .dex (Dalvik Executable) files, which are in turn
zipped into a single .apk file on the device. .dex files can be created by
automatically, translating compiled applications written in the Java
programming language.
What does ADT stand for?
ADT stands for
ANDROID DEVELOPMENT TOOLS The Android SDK includes several tools and utilities
to help you create, test, and debug your projects.
What are the different tools in Android?
Explain them?
The Android SDK and Virtual Device Manager:
It is used to create and manage Android Virtual Devices (AVD) and SDK packages. The AVD hosts an emulator running a particular build of Android, letting you specify the supported SDK version, screen resolution, amount of SD card storage available, and available hardware capabilities (such as touch screens and GPS).
The Android Emulator:
An implementation of the Android virtual machine designed to run within a virtual device on your development computer. Use the emulator to test and debug your Android applications.
Dalvik Debug Monitoring Service (DDMS) :
Use the DDMS perspective to monitor and control the Dalvik virtual machines on which you're debugging your applications.
Android Asset Packaging Tool (AAPT) :
Constructs the distributable Android package files (.apk).
Android Debug Bridge,(adb) :
Android Debug Bridge, is a command-line debugging application shipped with the SDK. It provides tools to browse the device, copy tools on the device, and forward ports for debugging.
What
is Dalvik Virtual Machine?
The
name of Android's virtual machine. The Dalvik VM is an interpreter-only virtual
machine that executes files in the Dalvik Executable (.dex) format, a format
that is optimized for efficient storage and memory-mappable execution. The
virtual machine is register-based, and it can run classes compiled by a Java
language compiler that have been transformed into its native format using the
included "dx" tool. The VM runs on top of Posix-compliant operating
systems, which it relies on for underlying functionality (such as threading and
low level memory management). The Dalvik core class library is intended to
provide a familiar development base for those used to programming with Java
Standard Edition, but it is geared specifically to the needs of a small mobile
device.
What is Android Runtime?
Android
includes a set of core libraries that provides most of the functionality
available in the core libraries of the Java programming language. Every Android
application runs in its own process, with its own instance of the Dalvik
virtual machine. Dalvik has been written so that a device can run multiple VMs
efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex)
format which is optimized for minimal memory footprint. 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.
What is the Open Handset Alliance?
The
OHA is a consortium of 84 technology and mobile companies that have joined
hands to accelerate innovation in mobile technology and at the same time offer
the end users a better, cost-effective and richer mobile experience. Members of
this include Google, HTC, Sony, Dell, Intel, Motorola, Qualcomm, Texas
Instruments, Samsung, LG, T-Mobile, Nvidia. The OHA was started on 5 November
2007 by Google and 34 other companies. Android is the main software of the
alliance.
What
is ViewGroup?
A
ViewGroup is a special view that can contain other views (called children.) The
view group is the base class for layouts and views containers. This class also
defines the class ViewGroup.LayoutParams which serves as the base class for
layouts parameters.
What is a Service?
A
Service is an application component representing either an application's desire
to perform a longer-running operation while not interacting with the user or to
supply functionality for other applications to use. Services run without a
dedicated GUI, but, like Activities and Broadcast Receivers, they still execute
in the main thread of the application's process. A Service could be facility
for an application to expose some of its functionality to other applications.
What is the difference between Service and
Thread?
Service
is like an Activity but has no interface. Probably if you want to fetch the
weather for example you won't create a blank activity for it, for this you will
use a Service. It is also known as Background Service because it performs tasks
in background. A Thread is a concurrent unit of execution. You need to know
that you cannot update UI from a Thread. You need to use a Handler for this.
What is Intent?
Intent
is an abstract description of an operation to be performed. Intent provides a
facility for performing late runtime binding between the codes in different
applications. Its most significant use is in the launching of activities, where
it can be thought of as the glue between activities Also; Intent is basically a
message that is passed between components (such as Activities, Services,
Broadcast Receivers, and Content Providers). So, it is almost equivalent to
parameters passed to API calls. The fundamental differences between API calls
and intents' way of invoking components are: API calls are synchronous while
intent-based invocations are asynchronous. API calls are compile time binding
while intent-based calls are run-time binding.
What is an Explicit Intent?
In an
explicit intent, we actually specify the activity that is required to respond
to the intent. In other words, we explicitly designate the target component.
This is typically used for application internal messages.
What is an Implicit Intent?
In an
implicit intent, the main power of the android design, we just declare intent
and leave it to the platform to find an activity that can respond to the
intent. Here, we do not declare the target component and hence is typically
used for activating components of other applications seamlessly
What is a Content Provider?
Content
Providers are the only way to share data across Android applications. They
store and retrieve data thus making it accessible to all. Content Providers
give a uniform interface to access the data. Android platform provides default
implementations of content providers for data types like audio, video, images,
contact information etc.
What is a Toast Notification?
A
toast notification is a message that pops up on the surface of the window. It
only fills the amount of space required for the message and the user's current
activity remains visible and interactive. The notification automatically fades
in and out, and does not accept interaction events.
What are the other Notifications?
A Status bar
Notification:
It is used for persistent reminders that come from the background and request the user's response.
A Dialog Notification:
It is used for Activity-related notifications.
It is used for persistent reminders that come from the background and request the user's response.
A Dialog Notification:
It is used for Activity-related notifications.
Open Source
What is the Android
Open Source Project?
We
use the phrase "Android Open Source Project" or "AOSP" to
refer to the people, the processes, and the source code that make up Android.
The
people oversee the project and develop the actual source code. The processes
refer to the tools and procedures we use to manage the development of the
software. The net result is the source code that you can use to build cell
phone and other devices.
Why did we open the
Android source code?
Google
started the Android project in response to our own experiences launching mobile
apps. We wanted to make sure that there would always be an open platform
available for carriers, OEMs, and developers to use to make their innovative
ideas a reality. We also wanted to make sure that there was no central point of
failure, so that no single industry player could restrict or control the
innovations of any other. The single most important goal of the Android
Open-Source Project (AOSP) is to make sure that the open-source Android
software is implemented as widely and compatibly as possible, to everyone's
benefit. You can find more information on this topic at our Project Philosophy
page.
What kind of
open-source project is Android?
Google
oversees the development of the core Android open-source platform, and works to
create robust developer and user communities. For the most part the Android
source code is licensed under the permissive Apache Software License 2.0,
rather than a "copyleft" license. The main reason for this is because
our most important goal is widespread adoption of the software, and we believe
that the ASL2.0 license best achieves that goal. You can find more information
on this topic at our Project Philosophy and Licensing pages.
Why is Google in
charge of Android?
Launching
a software platform is complex. Openness is vital to the long-term success of a
platform, since openness is required to attract investment from developers and
ensure a level playing field. However, the platform itself must also be a
compelling product to end users.
That's
why Google has committed the professional engineering resources necessary to
ensure that Android is a fully competitive software platform. Google treats the
Android project as a full-scale product development operation, and strikes the
business deals necessary to make sure that great devices running Android
actually make it to market.
By
making sure that Android is a success with end users, we help ensure the
vitality of Android as a platform, and as an open-source project. After all,
who wants the source code to an unsuccessful product?
Google's
goal is to ensure a successful ecosystem around Android, but no one is required
to participate, of course. We opened the Android source code so anyone can
modify and distribute the software to meet their own needs.
What is Google's
overall strategy for Android product development?
We
focus on releasing great devices into a competitive marketplace, and then
incorporate the innovations and enhancements we made into the core platform, as
the next version.
In
practice, this means that the Android engineering team typically focuses on a
small number of "flagship" devices, and develops the next version of
the Android software to support those product launches. These flagship devices
absorb much of the product risk and blaze a trail for the broad OEM community,
who follow up with many more devices that take advantage of the new features.
In this way, we make sure that the Android platform evolves according to the
actual needs of real-world devices.
How is the Android
software developed?
Each
platform version of Android (such as 1.5, 1.6, and so on) has a corresponding
branch in the open-source tree. At any given moment, the most recent such
branch will be considered the "current stable" branch version. This
current stable branch is the one that manufacturers port to their devices. This
branch is kept suitable for release at all times.
Simultaneously,
there is also a "current experimental" branch, which is where
speculative contributions, such as large next-generation features, are
developed. Bug fixes and other contributions can be included in the current
stable branch from the experimental branch as appropriate.
Finally,
Google works on the next version of the Android platform in tandem with
developing a flagship device. This branch pulls in changes from the
experimental and stable branches as appropriate.
Why are parts of
Android developed in private?
It
typically takes over a year to bring a device to market, but of course device
manufacturers want to ship the latest software they can. Developers, meanwhile,
don't want to have to constantly track new versions of the platform when
writing apps. Both groups experience a tension between shipping products, and
not wanting to fall behind.
To
address this, some parts of the next version of Android including the core
platform APIs are developed in a private branch. These APIs constitute the next
version of Android. Our aim is to focus attention on the current stable version
of the Android source code, while we create the next version of the platform as
driven by flagship Android devices. This allows developers and OEMs to focus on
a single version without having to track unfinished future work just to keep
up. Other parts of the Android system that aren't related to application
compatibility are developed in the open, however. It's our intention to move
more of these parts to open development over time.
When are source
code releases made?
When
they are ready. Some parts of Android are developed in the open, so that source
code is always available. Other parts are developed first in a private tree, and
that source code is released when the next platform version is ready.
In
some releases, core platform APIs will be ready far enough in advance that we
can push the source code out for an early look in advance of the device's
release; however in others, this isn't possible. In all cases, we release the
platform source when we feel the version has stabilized enough, and when the
development process permits. Releasing the source code is a fairly complex
process.
What is involved in
releasing the source code for a new Android version?
Releasing
the source code for a new version of the Android platform is a significant
process. First, the software gets built into a system image for a device, and
put through various forms of certification, including government regulatory
certification for the regions the phones will be deployed. It also goes through
operator testing. This is an important phase of the process, since it helps
shake out a lot of software bugs.
Once
the release is approved by the regulators and operators, the manufacturer
begins mass producing devices, and we turn to releasing the source code.
Simultaneous
to mass production the Google team kicks off several efforts to prepare the
open source release. These efforts include final API changes and documentation
(to reflect any changes that were made during qualification testing, for
example), preparing an SDK for the new version, and launching the platform
compatibility information.
Also
included is a final legal sign-off to release the code into open source. Just
as open source contributors are required to sign a Contributors License
Agreement attesting to their IP ownership of their contribution, Google too
must verify that it is clear to make contributions.
Starting
at the time mass production begins, the software release process usually takes
around a month, which often roughly places source code releases around the same
time that the devices reach users.
How does the AOSP
relate to the Android Compatibility Program?
The
Android Open-Source Project maintains the Android software, and develops new
versions. Since it's open-source, this software can be used for any purpose,
including to ship devices that are not compatible with other devices based on
the same source.
The
function of the Android Compatibility Program is to define a baseline
implementation of Android that is compatible with third-party apps written by
developers. Devices that are "Android compatible" may participate in
the Android ecosystem, including Google Play; devices that don't meet the
compatibility requirements exist outside that ecosystem.
In
other words, the Android Compatibility Program is how we separate "Android
compatible devices" from devices that merely run derivatives of the source
code. We welcome all uses of the Android source code, but only Android
compatible devices -- as defined and tested by the Android Compatibility
Program -- may participate in the Android ecosystem.
How can I
contribute to Android?
There
are a number of ways you can contribute to Android. You can report bugs, write
apps for Android, or contribute source code to the Android Open-Source Project.
There
are some limits on the kinds of code contributions we are willing or able to
accept. For instance, someone might want to contribute an alternative application
API, such as a full C++-based environment. We would decline that contribution,
since Android is focused on applications that run in the Dalvik VM.
Alternatively, we won't accept contributions such as GPL or LGPL libraries that
are incompatible with our licensing goals.
We
encourage those interested in contributing source code to contact us via the
AOSP Community page prior to beginning any work. You can find more information
on this topic at the Getting Involved page.
How do I become an
Android committer?
The
Android Open Source Project doesn't really have a notion of a
"committer". All contributions -- including those authored by Google
employees -- go through a web-based system known as "gerrit" that's
part of the Android engineering process. This system works in tandem with the
git source code management system to cleanly manage source code contributions.
Once
submitted, changes need to be accepted by a designated Approver. Approvers are
typically Google employees, but the same approvers are responsible for all
submissions, regardless of origin.
You
can find more information on this topic at the Submitting
Patches page.
Compatibility
What does
"compatibility" mean?
We
define an "Android compatible" device as one that can run any
application written by third-party developers using the Android SDK and NDK. We
use this as a filter to separate devices that can participate in the Android
app ecosystem, and those that cannot. Devices that are properly compatible can
seek approval to use the Android trademark. Devices that are not compatible are
merely derived from the Android source code and may not use the Android
trademark.
In
other words, compatibility is a prerequisite to participate in the Android apps
ecosystem. Anyone is welcome to use the Android source code, but if the device
isn't compatible, it's not considered part of the Android ecosystem.
What is the role of
Google Play in compatibility?
Devices
that are Android compatible may seek to license the Google Play client
software. This allows them to become part of the Android app ecosystem, by
allowing users to download developers' apps from a catalog shared by all
compatible devices. This option isn't available to devices that aren't
compatible.
What kinds of
devices can be Android compatible?
The
Android software can be ported to a lot of different kinds of devices,
including some on which third-party apps won't run properly. The Android
Compatibility Definition Document (CDD) spells out the specific device
configurations that will be considered compatible.
For
example, though the Android source code could be ported to run on a phone that
doesn't have a camera, the CDD requires that in order to be compatible, all
phones must have a camera. This allows developers to rely on a consistent set
of capabilities when writing their apps.
The
CDD will evolve over time to reflect market realities. For instance, the 1.6
CDD only allows cell phones, but the 2.1 CDD allows devices to omit telephony
hardware, allowing for non-phone devices such as tablet-style music players to
be compatible. As we make these changes, we will also augment Google Play to
allow developers to retain control over where their apps are available. To
continue the telephony example, an app that manages SMS text messages would not
be useful on a media player, so Google Play allows the developer to restrict
that app exclusively to phone devices.
If my device is
compatible, does it automatically have access to Google Play and branding?
Google
Play is a service operated by Google. Achieving compatibility is a prerequisite
for obtaining access to the Google Play software and branding. Device
manufacturers should contact Google to obtain access to Google Play.
If I am not a
manufacturer, how can I get Google Play?
Google
Play is only licensed to handset manufacturers shipping devices.
How can I get access to the Google apps for Android,
such as Maps?
The
Google apps for Android, such as YouTube, Google Maps and Navigation, Gmail,
and so on are Google properties that are not part of Android, and are licensed
separately.
Is compatibility
mandatory?
No.
The Android Compatibility Program is optional. Since the Android source code is
open, anyone can use it to build any kind of device. However, if a manufacturer
wishes to use the Android name with their product, or wants access to Google
Play, they must first demonstrate that the device is compatible.
How much does
compatibility certification cost?
There
is no cost to obtain Android compatibility for a device. The Compatibility Test
Suite is open-source and available to anyone to use to test a device.
How
long does compatibility take?
The
process is automated. The Compatibility Test Suite generates a report that can
be provided to Google to verify compatibility. Eventually we intend to provide
self-service tools to upload these reports to a public database.
Who determines what
will be part of the compatibility definition?
Since
Google is responsible for the overall direction of Android as a platform and
product, Google maintains the Compatibility Definition Document for each
release. We draft the CDD for a new Android version in consultation with a
number of OEMs, who provide input on its contents.
How long will each
Android version are supported for new devices?
Since
Android's code is open-source, we can't prevent someone from using an old
version to launch a device. Instead, Google chooses not to license the Google
Play client software for use on versions that are considered obsolete. This
allows anyone to continue to ship old versions of Android, but those devices
won't use the Android name and will exist outside the Android apps ecosystem,
just as if they were non-compatible.
Can a device have a
different user interface and still be compatible?
The
Android Compatibility Program focuses on whether a device can run third-party
applications. The user interface components shipped with a device (such as home
screen, dialler, color scheme, and so on) does not generally have much effect
on third-party apps. As such, device builders are free to customize the user
interface as much as they like. The Compatibility Definition Document does
restrict the degree to which OEMs may alter the system user interface for areas
that do impact third-party apps.
When is
compatibility definitions released for new Android versions?
Our
goal is to release new versions of Android Compatibility Definition Documents
(CDDs) once the corresponding Android platform version has converged enough to
permit it. While we can't release a final draft of a CDD for Android software
version before the first flagship device ships with that software, final CDDs
will always be released after the first device. However, wherever practical we
will make draft versions of CDDs available.
How are device
manufacturers' compatibility claims validated?
There
is no validation process for Android device compatibility. However, if the
device is to include Google Play, Google will typically validate the device for
compatibility before agreeing to license the Google Play client software.
What happens if a
device that claims compatibility is later found to have compatibility problems?
Typically,
Google's relationships with Google Play licensees allow us to ask them to
release updated system images that fix the problems.
Compatibility Test Suite
What is the purpose
of the CTS?
The
Compatibility Test Suite is a tool used by device manufacturers to help ensure
their devices are compatible, and to report test results for validations. The
CTS is intended to be run frequently by OEMs throughout the engineering process
to catch compatibility issues early.
What kinds of
things does the CTS test?
The
CTS currently tests that all of the supported Android strong-typed APIs are
present and behave correctly. It also tests other non-API system behaviours
such as application lifecycle and performance. We plan to add support in future
CTS versions to test "soft" APIs such as Intents as well.
Will the CTS
reports be made public?
Yes.
While not currently implemented, Google intends to provide web-based
self-service tools for OEMs to publish CTS reports so that they can be viewed
by anyone. CTS reports can be shared as widely as manufacturers prefer.
How is the CTS
licensed?
The
CTS is licensed under the same Apache Software License 2.0 that the bulk of
Android uses.
Does the CTS accept
contributions?
Yes
please! The Android Open-Source Project accepts contributions to improve the
CTS in the same way as for any other component. In fact, improving the coverage
and quality of the CTS test cases is one of the best ways to help out Android.
Can anyone use the
CTS on existing devices?
The
Compatibility Definition Document requires that compatible devices implement
the 'adb' debugging utility. This means that any compatible device -- including
ones available at retail -- must be able to run the CTS tests
Frequently
asked Android Interview Questions
Q.1 What is an activity?
An
activity is a single screen in an application which supports Java code.
Q.2
Explain different phases of Activity Life Cycle.
Whole
life cycle consist of Activity launched, Activity Running and Activity
shutdown.
onCreate()
onStart()
onResume()
onPause()
onStop()
onDestroy()
Q.3
Is it true that android applications can only be programmed in Java?
No.
android applications can also be programmed in C++ and C#.
Q.4 What is the architecture of Android?
On
Top, Applications (Contact, Browser and phone)
Application
framework (Activity Manager, Content providers, view system and package
manager)
Below
Application Frame work > System libraries like, webkit, SSL and OpenGL.
On
Bottom, Linux Kernel (includes display and camera)
Q.5
What is APK format?
The
APK file is compressed form of an elongated version which is
AndroidManifest.xml, .dex files, resource files etc.
Q.6
Which virtual machine does Android runs on?
Android
runs on Dalvik Virtual Machine(DVM).
Q.7
How is the nine patch image different from a regular bitmap?
Regular
bitmaps are not re-sizable while nine patch allows drawing a bitmap image in
nine sections.
Q.8
How to test and run android application during development?
Android
app can be tested and run on emulator and/or real android phone during
development.
Q.9
Java compiled code also runs on android? Yes, how? No, Why?
No,
java code compiled into bytecode by jvm but android code compiled into .dex
format by dvm.
Q.10
What is a service in Android?
A
service doesn’t have a visual user interface, instead it runs in the background
for an indefinite period of time. For example, a service might play background.
Q.11
How many ways used to create the user interface in android?
There
are two ways to create user interface, One is by xml and the other one is by
coding.
Q.12
How does Android system track the applications on android phone?
Android
system assigns each application a unique ID that is called Linux user ID. This
ID is used to track each application.
Q.13
What is an Intent?
An Intent is
basically a message to say something to happen. Depending on the type of
intent, you can start another activity, can make call through intent etc.
Q.14
What is a resource?
All
Android applications contains some sort of resources, they often have the user
interface layouts in the form of XML files, app related icons, and strings etc
are android resources.
Q.15
What is the difference between startActivity() and startActivityforResult()?
In
Android, startActivity() is used just to start another activity while
startActivityforResult() is used to start another activity which also returns
some data to previous activity
Here are
some basic Android related interview questions and their respective answers.
What is Android?
Android is a stack of software for mobile devices which includes an Operating System, middleware and some key applications. The application executes within its own process and its own instance of Dalvik Virtual Machine. Many Virtual Machines run efficiently by a DVM device. DVM executes Java languages byte code which later transforms into .dex format files.
Android is a stack of software for mobile devices which includes an Operating System, middleware and some key applications. The application executes within its own process and its own instance of Dalvik Virtual Machine. Many Virtual Machines run efficiently by a DVM device. DVM executes Java languages byte code which later transforms into .dex format files.
What is an Activity?
A single screen in an application, with supporting Java code.
A single screen in an application, with supporting Java code.
What is an Intent?
A class (Intent) which describes what a caller desires to do. The caller will send this intent to Android’s intent resolver, which finds the most suitable activity for the intent. E.g. opening a PDF document is an intent, and the Adobe Reader apps will be the perfect activity for that intent (class).
A class (Intent) which describes what a caller desires to do. The caller will send this intent to Android’s intent resolver, which finds the most suitable activity for the intent. E.g. opening a PDF document is an intent, and the Adobe Reader apps will be the perfect activity for that intent (class).
What is a Sticky Intent?
sendStickyBroadcast() performs a sendBroadcast(Intent) known as sticky, i.e. the Intent you are sending stays around after the broadcast is complete, so that others can quickly retrieve that data through the return value of registerReceiver(BroadcastReceiver, IntentFilter). In all other ways, this behaves the same as sendBroadcast(Intent). One example of a sticky broadcast sent via the operating system is ACTION_BATTERY_CHANGED. When you call registerReceiver() for that action — even with a null BroadcastReceiver — you get the Intent that was last broadcast for that action. Hence, you can use this to find the state of the battery without necessarily registering for all future state changes in the battery.
sendStickyBroadcast() performs a sendBroadcast(Intent) known as sticky, i.e. the Intent you are sending stays around after the broadcast is complete, so that others can quickly retrieve that data through the return value of registerReceiver(BroadcastReceiver, IntentFilter). In all other ways, this behaves the same as sendBroadcast(Intent). One example of a sticky broadcast sent via the operating system is ACTION_BATTERY_CHANGED. When you call registerReceiver() for that action — even with a null BroadcastReceiver — you get the Intent that was last broadcast for that action. Hence, you can use this to find the state of the battery without necessarily registering for all future state changes in the battery.
How the nine-patch
Image different from a regular bitmap? Alternatively, what is the difference
between nine-patch Image vs. regular Bitmap Image?
It is one of a resizable bitmap resource which is being used as backgrounds or other images on the device. The NinePatch class allows drawing a bitmap in nine sections. The four corners are unscaled; the middle of the image is scaled in both axes, the four edges are scaled into one axis.
It is one of a resizable bitmap resource which is being used as backgrounds or other images on the device. The NinePatch class allows drawing a bitmap in nine sections. The four corners are unscaled; the middle of the image is scaled in both axes, the four edges are scaled into one axis.
What is a resource?
A user defined JSON, XML, bitmap, or other file, injected into the application build process, which can later be loaded from code.
A user defined JSON, XML, bitmap, or other file, injected into the application build process, which can later be loaded from code.
How will you record a phone call in Android?
Or
How to handle
an Audio Stream for a call in Android?
Permission.PROCESS_OUTGOING_CALLS: Will Allow an application to monitor, modify, or abort outgoing calls. So using that permission we can monitor the Phone calls.
Permission.PROCESS_OUTGOING_CALLS: Will Allow an application to monitor, modify, or abort outgoing calls. So using that permission we can monitor the Phone calls.
Does Android support the Bluetooth serial port
profile?
Yes.
Yes.
Can an application be started on powerup?
Yes.
Yes.
What is the APK format?
The APK file is compressed AndroidManifest.xml file with extension .apk. It also includes the application code (.dex files), resource files, and other files which are compressed into a single .apk file.
The APK file is compressed AndroidManifest.xml file with extension .apk. It also includes the application code (.dex files), resource files, and other files which are compressed into a single .apk file.
How to Translate in Android?
The Google translator translates the data of one language into another language by using XMPP to transmit data. You can type the message in English and select the language which is understood by the citizens of the country in order to reach the message to the citizens.
The Google translator translates the data of one language into another language by using XMPP to transmit data. You can type the message in English and select the language which is understood by the citizens of the country in order to reach the message to the citizens.
Describe Briefly the Android Application
Architecture:
Android Application
Architecture has the following components:
§ Services
like Network Operation
Intent – To perform inter-communication between activities or services
Intent – To perform inter-communication between activities or services
§ Resource
Externalization – such as strings and graphics
Notification signalling users – light, sound, icon, notification, dialog etc.
Notification signalling users – light, sound, icon, notification, dialog etc.
§ Content
Providers – They share data between applications
What is needed to
make a multiple choice list with a custom view for each row?
Multiple choice list can be viewed by making the CheckBox android:id value be “@android:id /text1″. That is the ID used by Android for the CheckedTextView in simple_list_item_multiple_choice.
Multiple choice list can be viewed by making the CheckBox android:id value be “@android:id /text1″. That is the ID used by Android for the CheckedTextView in simple_list_item_multiple_choice.
What dialog boxes are
supported in android? Android supports 4 dialog boxes:
§ AlertDialog:
An alert dialog box
supports 0 to 3 buttons and a list of selectable elements, including check
boxes and radio buttons. Among the other dialog boxes, the most suggested
dialog box is the alert dialog box.
§ ProgressDialog:
This dialog box
displays a progress wheel or a progress bar. It is an extension of AlertDialog
and supports adding buttons.
§ DatePickerDialog:
This dialog box is used for selecting a date by the user.
§ TimePickerDialog:
This dialog box is used for selecting time by the user.
No comments:
Post a Comment