Chap 5

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 35

Mobile Computing

Chapter Five: Android


Agenda
Introduction to android

Android versions

Features of Android

Architecture of Android

Android devices in the market

Android studio installation


Introduction to Android
 What is android?

 Android is a mobile operating system that is based on a modified version of Linux.

 In 2005, as part of its strategy to enter the mobile space, Google purchased

Android and took over its development work.

 Google wanted Android to be open and free; hence, most of the Android code was

released under the open-source Apache License, which means that anyone who

wants to use Android can do so by downloading the full Android source code.
Cont.…

This simple development model makes Android very attractive and has thus

piqued the interest of many vendors.

The main advantage of adopting Android is that it offers a unified approach to

application development.

Developers need only develop for Android, and their applications should be able

to run on numerous different devices, as long as the devices are powered using

Android.
Android versions
Features of Android

 Storage — Uses SQLite, a lightweight relational database, for data


storage.

 Connectivity — Supports GSM/EDGE, IDEN, CDMA, EV-DO, UMTS,


Bluetooth Wi-Fi, LTE, and WiMAX.

 Messaging — Supports both SMS and MMS.

 Web browser — Based on the open-source WebKit, together with


Chrome’s V8 JavaScript engine
Cont.…

 Media support — Includes support for the following media: H.263, H.264 (in 3GP
or MP4 container), MPEG-4 SP, AMR, AMR-WB (in 3GP container), AAC, HE-AAC
(in MP4 or 3GP container), MP3, MIDI, Ogg Vorbis, WAV, JPEG, PNG, GIF, and
BMP

 Hardware support — Sensor, Camera, Digital Compass, and GPS

 Multi-touch — Supports multi-touch screens

 Multi-tasking — Supports multi-tasking applications

 Tethering — Supports sharing of Internet connections as a wired/wireless hotspot


Architecture of Android
 Android provides a rich development architecture.
Cont.…
 Linux kernel — This is the kernel on which Android is based. This layer contains all the

low-level device drivers for the various hardware components of an Android device.

 Libraries — These contain all the code that provides the main features of an Android OS.

 Android runtime — At the same layer as the libraries, the Android runtime provides a set

of core libraries that enable developers to write Android apps using the Java programming

language.

 Application framework — Exposes the various capabilities of the Android OS to

application developers so that they can make use of them in their applications.

 Applications — At this top layer, you will find applications that ship with the Android device

(such as Phone, Contacts, Browser, etc.), as well as applications that you download and install
Android devices in the market
Android devices come in all shapes and sizes.
 Smartphones
 Tablets
 E-reader devices
 Netbooks
 MP4 players
 Internet TVs
 Smart watches
The Android market
One of the main factors determining the success of a smartphone platform is the

applications that support it.

In August 2008, Google announced the Android Market, an online application store for

Android devices, and made it available to users in October 2008

Using the Market application that is preinstalled on their Android device, users can

simply download third-party applications directly onto their devices.

Both paid and free applications are supported on the Android Market, though paid

applications are available only to users in certain countries due to legal issues.

Similarly, in some countries, users can buy paid applications from the Android Market,

but developers cannot sell in that country


Android studio installation
Requirements
System Requirements for Windows

 Microsoft® Windows® 8/7/10 (32 or 64-bit)

 4 GB RAM minimum, 8 GB RAM recommended

 400 MB hard disk space

 At least 1 GB for Android SDK, emulator system images, and caches

 1280 x 800 minimum screen resolution

 Java Development Kit (JDK) 7

 Optional for accelerated emulator: Intel® processor with support for Intel® VT-x,
Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality
Cont.…

Java JDK7 or later version

Java Runtime Environment (JRE) 6

Android Studio
Installation
 Java

1. Visithttp://www.oracle.com/technetwork/java/javase/downloads/index.html

2. Install it

3. Android Studio

3. Visit http://developer.android.com/sdk/index.html

4. click the button Download Android Studio.

5. Accept terms, and click Download.

6. Run executable file of setup


Cont.…
 So let's launch Android Studio.exe, Make sure before
launch Android Studio, Our Machine should required
installed Java JDK. To install Java JDK, take a
references of Android environment setup
Cont.…
Once you launched Android Studio, its
time to mention JDK7 path or later
version in android studio installer.
Cont.…
Below the image initiating JDK to android SDK
Cont.…
Need to check the components, which are
required to create applications, below the
image has selected

Android Studio, Android SDK, Android


Virtual Machine and performance(Intel
chip)
Cont.…
Need to specify the location of local
machine path for Android studio and
Android SDK, below the image has taken
default location of windows 10 x64 bit
architecture.
Cont.…
Need to specify the ram space for Android emulator by default it would take 512MB of
local machine RAM.
Cont.…

At final stage, it would extract SDK packages into our local machine, it would take
a while time to finish the task and would take 2626MB of Hard disk space.
Cont.…

After done all above steps perfectly, you must get finish button and it gonna be
open android studio project with Welcome to android studio message as shown
below
Cont.…

You can start your application


development by calling start a new
android studio project. In a new
installation frame should ask
Application name, package
information and location of the
project.
Cont…
After entered application name, it going to
be called select the form factors your
application runs on, here need to specify
Minimum SDK, in our tutorial, I have
declared as API23: Android
6.0(Mashmallow)
Cont.…

The next level of installation


should contain selecting the
activity to mobile, it specifies the
default layout for Applications
Create Android Virtual Device

To test your Android applications, you


will need a virtual Android device. So
before we start writing our code, let us
create an Android virtual device.
Launch Android AVD Manager
Clicking AVD_Manager icon as shown
below
Cont.…

At the final stage it going to be


open development tool to write the
application code.
Cont.…

After Click on a virtual device icon, it


going to be shown by default virtual
devices which are present on your
SDK, or else need to create a virtual
device by clicking Create new
Virtual device button
Cont…
To test your Android applications,
you will need a virtual Android
device. So before we start writing
our code, let us create an Android
virtual device.

Launch Android AVD Manager


Clicking AVD_Manager icon as
shown below
Cont.…
After Click on a virtual device icon, it going to
be shown by default virtual devices which are
present on your SDK, or else need to create a
virtual device by clicking Create new
Virtual device button
Cont.…

If your AVD is created successfully it means your environment is ready


for Android application development.
 If you like, you can close this window using top-right cross button.
 Better you re-start your machine and once you are done with this
last step, you are ready to proceed for your first Android example
but before that we will see few more important concepts related to
Android Application Development.
Hello Word Example

Before Writing a Hello word code, you


must know about XML tags.To write
hello word code, you should redirect
toApp>res>layout>Activity_mai
n.xml
Cont.…
To show hello word, we need
to call text view with layout
( about text view and layout,
you must take references at
Relative Layout and Text
View ).
Thank you!

You might also like