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

Android

Android is an open source, Linux-based operating system led by Google. It uses APIs and runtimes like Dalvik and ART to allow apps to run in their own process with an instance of a virtual machine. The architecture includes layers for Linux, libraries, the runtime, framework, and applications. Key app components in Android are activities, services, broadcast receivers, and content providers, which are defined in the manifest file and can interact through intents.

Uploaded by

Shubham Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views

Android

Android is an open source, Linux-based operating system led by Google. It uses APIs and runtimes like Dalvik and ART to allow apps to run in their own process with an instance of a virtual machine. The architecture includes layers for Linux, libraries, the runtime, framework, and applications. Key app components in Android are activities, services, broadcast receivers, and content providers, which are defined in the manifest file and can interact through intents.

Uploaded by

Shubham Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 29

ANDROID

Android is an open source and LinuxbasedOperating Systemfor mobile


devices such as smartphones and
tablet computers. Android was
developed by theOpen Handset
Alliance, led by Google, and other
companies.

What is API level?


API Level is an integer value that
uniquely identifies the framework API
revision offered by a version of the
Android platform.

Android IDEs
There are so many sophisticated
Technologies are available to develop
android applications, the familiar
technologies, which are
predominantly using tools as follows
Android Studio
Eclipse IDE

ARCH.

LINUX
At the bottom of the layers is Linux - This
provides a level of abstraction between
the device hardware and it contains all
the essential hardware drivers like
camera, keypad, display etc. Also, the
kernel handles all the things that Linux is
really good at such as networking and a
vast array of device drivers, which take
the pain out of interfacing to peripheral
hardware.

Libraries
On top of Linux kernel there is a set of
libraries including open-source Web
browser engine WebKit, well known
library libc, SQLite database which is
a useful repository for storage and
sharing of application data, libraries
to play and record audio and video,
SSL libraries responsible for Internet
security etc.

Android Libraries
android.app Provides access to the application model and is the
cornerstone of all Android applications.
android.content Facilitates content access, publishing and messaging
between applications and application components.
android.database Used to access data published by content
providers and includes SQLite database management classes.
android.opengl A Java interface to the OpenGL ES 3D graphics
rendering API.
android.os Provides applications with access to standard operating
system services including messages, system services and interprocess communication.
android.text Used to render and manipulate text on a device display.
android.view The fundamental building blocks of application user
interfaces.
android.widget A rich collection of pre-built user interface
components such as buttons, labels, list views, layout managers, radio
buttons etc.
android.webkit A set of classes intended to allow web-browsing
capabilities to be built into applications.

Android Runtime
This is the third section of the architecture and available
on the second layer from the bottom. This section
provides a key component calledDalvik Virtual
Machinewhich is a kind of Java Virtual Machine
specially designed and optimized for Android.
The Dalvik VM makes use of Linux core features like
memory management and multi-threading, which is
intrinsic in the Java language. The Dalvik VM enables
every Android application to run in its own process,
with its own instance of the Dalvik virtual machine.
The Android runtime also provides a set of core libraries
which enable Android application developers to write
Android applications using standard Java
programming language.

Application Framework
Activity Manager Controls all aspects of the
application lifecycle and activity stack.
Content Providers Allows applications to
publish and share data with other applications.
Resource Manager Provides access to noncode embedded resources such as strings,
color settings and user interface layouts.
Notifications Manager Allows applications to
display alerts and notifications to the user.
View System An extensible set of views used
to create application user interfaces.

Applications
You will find all the Android application
at the top layer. You will write your
application to be installed on this
layer only. Examples of such
applications are Contact Books,
Browser, Games etc.

Application components are the


essential building blocks of an
Android application. These
components are loosely coupled by
the application manifest file
AndroidManifest.xml that describes
each component of the application
and how they interact.

There are following four main components that


can be used within an Android application:
Activities---They dictate the UI and handle the
user interaction to the smart phone screen
Services----They handle background processing
associated with an application.
Broadcast Receivers---They handle
communication between Android OS and
applications.
Content Providers----They handle data and
database management issues.

Activities
An activity represents a single screen with a
user interface,in-short Activity performs
actions on the screen. For example, an email
application might have one activity that
shows a list of new emails, another activity to
compose an email, and another activity for
reading emails. If an application has more
than one activity, then one of them should be
marked as the activity that is presented when
the application is launched.
An activity is implemented as a subclass
ofActivityclass as follows
public class MainActivity extends Activity { }

Services
A service is a component that runs in the
background to perform long-running
operations. For example, a service might
play music in the background while the
user is in a different application, or it
might fetch data over the network without
blocking user interaction with an activity.
A service is implemented as a subclass
ofServiceclass as follows
public class MyService extends Service { }

Broadcast Receivers
Broadcast Receivers simply respond to broadcast
messages from other applications or from the
system. For example, applications can also initiate
broadcasts to let other applications know that
some data has been downloaded to the device
and is available for them to use, so this is
broadcast receiver who will intercept this
communication and will initiate appropriate action.
A broadcast receiver is implemented as a subclass
ofBroadcastReceiverclass and each message is
broadcaster as anIntentobject.
public class MyReceiver extends BroadcastReceiver
{ public void onReceive(context,intent){} }

Content Providers
A content provider component supplies data
from one application to others on request.
Such requests are handled by the methods of
theContentResolverclass. The data may be
stored in the file system, the database or
somewhere else entirely.
A content provider is implemented as a subclass
ofContentProviderclass and must
implement a standard set of APIs that enable
other applications to perform transactions.
public class MyContentProvider extends
ContentProvider { public void onCreate(){} }

Additional Components
There are additional components which will be used
in the construction of above mentioned entities,
their logic, and wiring between them. These
components are---- Fragments--Represents a portion of user interface in
an Activity.
Views--UI elements that are drawn on-screen
including buttons, lists forms etc.
Layouts---View hierarchies that control screen format
and appearance of the views.
Intents---Messages wiring components together.
Resources---External elements, such as strings,
constants and drawable pictures.
Manifest----Configuration file for the application.

Android Application
building blocks
Every application framework has some key
components that developers need to understand
before they can begin to write applications
based on the framework. For example, you need
to understand Java Server Pages (JSP) and
servlets in order to write Java 2 Platform,
Enterprise Edition (J2EE) applications. Similarly,
you need to understand views, activities,
fragments, intents, content providers, services,
and theAndroidManifest.xml file when you build
applications for Android.

VIEW
Views are user interface (UI)
elements that form the basic building
blocks of a user interface. A view can
be a button, a label, a text field, or
many other UI elements.
Views are also used as containers for
views, which means theres usually a
hierarchy of views in the UI. In the
end, everything you see is a view.

Activity
An activity is a UI concept that usually
represents a single screen in your
application. It generally contains one or
more views, but it doesnt have to. An
activity is pretty much like it sounds
something that helps the user do one
thing, which could be viewing data,
creating data, or editing data. Most
Android applications have several
activities within them.

Fragment
When a screen is large, it becomes
difficult to manage all of its functionality
in a single activity. Fragments are like
sub-activities, and an activity can display
one or more fragments on the screen at
the same time. When a screen is small,
an activity is more likely to contain just
one fragment, and that fragment can be
the same one used within larger screens.

Intent
An intent generically defines an intention to do
some work. Intents encapsulate several
concepts, so the best approach to understanding
them is to see examples of their use. You can
use intents to perform the following tasks:
Broadcast a message.
Start a service.
Launch an activity.
Display a web page or a list of contacts.
Dial a phone number or answer a phone call.

Content Provider
Data sharing among mobile applications
on a device is common. Therefore,
Android defines a standard mechanism
for applications to share data (such as a
list of contacts)without exposing the
underlying storage, structure, and
implementation. Through content
providers, you can expose your data and
have your applications use data from
other applications.

Service
Services in Android resemble services you
see in Windows or other platformstheyre
background processes that can potentially
run for a long time. Android defines two
types of services: local services and
remote services. Local services are
components that are only accessible by
the application that is hosting the service.
Conversely, remote services are services
that are meant to be accessed remotely by
other applications running on the device.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy