0% found this document useful (0 votes)
87 views63 pages

Unit 1 & 2 MAD

* Android is an open source operating system developed by Google and the Open Handset Alliance for use in mobile devices such as smartphones and tablets. * It uses a modified version of the Linux kernel and other open source software, and is designed primarily for touchscreen mobile devices. * Developers need only develop for Android, and their applications should be able to run on different devices powered by Android.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views63 pages

Unit 1 & 2 MAD

* Android is an open source operating system developed by Google and the Open Handset Alliance for use in mobile devices such as smartphones and tablets. * It uses a modified version of the Linux kernel and other open source software, and is designed primarily for touchscreen mobile devices. * Developers need only develop for Android, and their applications should be able to run on different devices powered by Android.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 63

* Unit 1

Android and its Tools (4 marks)

Ms.Nitanjali Mane
Computer Department
PCP,Nigdi
Mobile Operating Systems
• A mobile OS is an operating system for smartphones, tablets, PDAs, or
other mobile devices.
• Mobile OSs combine features of a personal computer OS with other
features useful for mobile or handheld use; usually including, and most
of the following considered essential in modern mobile systems;
* touchscreen, cellular, Bluetooth, Wi-Fi, GPS mobile navigation, camera,
video camera, speech recognition, voice recorder, music player, etc.
* Some Current software platforms
• Android (based on the Linux Kernel) is from Google Inc.
• CyanogenMod and Cyanogen OS are based on the open source Android
Open Source Project(AOSP).
• Fire OS is an operating system launched by Amazon based on Google's
AOSP.
• iOS (previously known as iPhone OS) is from Apple Inc.
• Windows Phone (Soon to be Windows 10 Mobile) is from Microsoft.
• BlackBerry 10 (based on the QNX OS) is from BlackBerry.
• Firefox OS is from Mozilla.
* Android is an open source and Linux-based Operating System
for mobile devices such as smartphones and tablet computers.

* Android was developed by the Open Handset Alliance, led by


Google, and other companies.

* Developers need only develop for Android, and their


applications should be able to run on different devices
powered by Android.
History of Android
* The history and versions of android are interesting to know.
* The code names of android ranges from A to J currently, such
as Aestro, Blender, Cupcake, Donut, Eclair, Froyo, Gingerbread, Hon
eycomb, Ice Cream Sandwitch, Jelly Bean, KitKat and Lollipop.

* Let's understand the android history in a sequence.


* 1) Initially, Andy Rubin founded Android Incorporation in Palo Alto,
California, United States in October, 2003.

* 2) In 17th August 2005, Google acquired android Incorporation. Since


then, it is in the subsidiary of Google Incorporation.

* 3) The key employees of Android Incorporation are Andy Rubin, Rich


Miner, Chris White and Nick Sears.
* 4) Originally intended for camera but shifted to smart phones
later because of low market for camera only.

* 5) Android is the nick name of Andy Rubin given by coworkers


because of his love to robots.

* 6) In 2007, Google announces the development of android OS.


* 7) In 2008, HTC launched the first android mobile.
Open Handset Alliance (OHA)

• The Open Handset Alliance (OHA) is a business alliance


that was created for the purpose of developing open
mobile device standards.

• The OHA has approximately 80 member companies,


including HTC, Dell, Intel, Motorola, Qualcomm and
Google. The OHA's main product is the Android
platform - the world's most popular smartphone
platform.
• OHA members are primarily mobile operators,
handset manufacturers, software development
firms, semiconductor companies and
commercialization companies.

• Members share a commitment to expanding the


commercial viability of open platform
development.
*ANDROID ECOSYSTEM
Ecosystem in Market terminology refers to the inter-
dependence between demand and supply.

In the Android ecosystem this translates to inter-dependence


between users, developers, and equipment makers. One
cannot exist without the other: Users buy devices and
applications.

Google
OEMs(Original Equipment manufacturers)
Application Development companies
Freelance android developers
*Why Android ?
Features of Android
Requirements for Android

*OS
• Android application development on either of the following operating systems:

* Microsoft Windows.

* Mac OS X 10.5.8 or later version with Intel chip.

* Linux including GNU C Library 2.7 or later.

*Tools
• All the required tools to develop Android applications are freely available and can be
downloaded from the Web. Following is the list of software's you will need before you start
your Android application programming.
1. Java JDK6 or later version

2. Android Studio / Android SDK and Eclipse IDE for Java Developers (optional) and Android
Development Tools (ADT) Eclipse Plug-in (optional)
Requirements for Android

*Download Android Studio


• From http://developer.android.com/sdk/installing/index.html

*System Requirements for Windows


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

• 3 GB RAM minimum, 8 GB RAM recommended (plus 1 GB for the Android


Emulator)

• 2 GB of available disk space minimum, 4 GB recommended (500 MB for


IDE plus 1.5 GB for Android SDK and emulator system image)

• 1280 x 800 minimum screen resolution

• Java Development Kit (JDK) 8


*Architecture of Android
• Android architecture contains different number of components to support
any android device needs.

• Android software contains an open-source Linux Kernel having collection


of number of C/C++ libraries which are exposed through an application
framework services.

• The main components of android architecture are following:-


1.Linux kernel
2.native libraries (middleware),
3.Android Runtime
4.Application Framework
5.Applications
1) Linux kernel
• It is the heart of android architecture that exists at the root of android
architecture.
• Linux kernel is responsible for device drivers, power management, memory
management, device management and resource access.

2) Native Libraries
• On the top of linux kernel, their are Native libraries such as WebKit,
OpenGL, FreeType, SQLite, Media, C runtime library (libc) etc.
• The WebKit library is responsible for browser support, SQLite is for
database, FreeType for font support, Media for playing and recording audio
and video formats.
3) Android Runtime
• In android runtime, there are core libraries and DVM (Dalvik Virtual
Machine) which is responsible to run android application.
• DVM is like JVM but it is optimized for mobile devices. It consumes less
memory and provides fast performance.
4) Android Framework
• On the top of Native libraries and android runtime, there is android
framework.
• Android framework includes Android API's such as UI (User Interface),
telephony, resources, locations, Content Providers (data) and package
managers.
• It provides a lot of classes and interfaces for android application
development.
5) Applications
• On the top of android framework, there are applications.
• All applications such as home, contact, settings, games, browsers are
using android framework that uses android runtime and libraries.
• Android runtime and native libraries are using linux kernal.
* Advantages of Android
• Supports 2D and 3D Graphics
• Supports multiple language
• Faster Web browser
• Video calling
• Open source framework
• Multitasking
• Uses of tool are very easy.
• Low chance if crashing.
* Disadvantages of Android
• Need Internet connection
• Advertising
• Wasteful Battery
• Many applications contain virus
• Slow response
• Processor heats.
* Unit 2
Installation and configuration of Android
(6 marks)

Ms.Nitanjali Mane
Computer Department
PCP,Nigdi
*Operating System
* In the Computer System (comprises of Hardware and
software), Hardware can only understand machine code (in
the form of 0 and 1) which doesn't make any sense to a
naive user.
* We need a system which can act as an intermediary and
manage all the processes and resources present in the
system.
• An Operating System can be defined as an interface between user and
hardware. It is responsible for the execution of all the processes, Resource
Allocation, CPU management, File Management and many other tasks.
Difference between Android and Windows OS
Terms Android OS Windows OS
Developer Android was developed and owned Windows was developed and owned
by Google LLC. by Microsoft Incorporation.

Devices Android is specifically designed for Windows is designed for PC of all


mobile devices. companies.
Default User Interface Android has a Graphical (Multi-touch) Windows OS Graphical (Metro UI).
user interface.
Home Screen In android phones, the Home screen has In windows phone, the Home screen
background wallpaper with basic apps is the Live tiles which are the
like camera, gallery, phone, contact, etc. combination of some basic apps like
The widgets can also add to the home camera, gallery, phone, message,
screen. contact etc. with
some other useful apps and widgets.

Kernel In Android, the Kernel type is Linux- In Windows, the Kernel type is
based. Hybrid with modules here.
Apps Android is an open-source platform, so Windows Store does not even
it has more applications and games than offer you millions of apps.
a windows operating system. Moreover, some of these apps
Android OS comes with Google
and games are free to download,
PlayStore, which has more than 2.2
million applications and games that while some are paid.
work with different Android versions.
Cost Android apps are free of cost. Windows apps are charged for the
original version.
Security Android is not more secured because The Windows operating system offers
it is an open-source platform. you more security as compared to
Android OS.
The Windows Store is not as simple as
the Android Operating system.
To upload any apps, users need to go
through strict security checkups.

Languages Android OS uses Java, C, C++ Windows OS uses C, C++ languages.


languages.
Supported platforms Android OS supports ARM, MIPS, Windows OS only supports x86
x86, I.MX.
Root Support All Android OS are supported for root Currently, any Windows phone OS does
access. not support root access.
Settings Android provides a clear set of In Windows Phone, a lot of settings make
settings for different applications and users confused, and users face
makes user jobs much easier. difficulties.

Keyboard Users can customize the keyboard Windows Phone is strict as the user has
layout depending on their use, whether to go with a swipe keyboard and leaves
it has to go for a default version or a no other choice for users.
swipe one.
Java JDK
• The Java Development Kit (JDK) is a software development environment used
for developing Java applications and applets.
• It includes the Java Runtime Environment (JRE), an interpreter/loader (java), a
compiler (javac), an archiver (jar), a documentation generator (javadoc) and
other tools needed in Java development.
• JVM
• JVM (Java Virtual Machine) is a specification that provides runtime environment
in which java bytecode can be executed.
• JVMs are available for many hardware and software platforms. JVM is a part of
Java Run Environment (JRE).
• The JVM performs following operation:
* Loads code
* Verifies code
* Executes code
* Provides runtime environment

*JRE
* The Java Runtime Environment (JRE) is a set of software tools for development
of Java applications. It combines the Java Virtual Machine (JVM), platform core
classes and supporting libraries.
Android SDK
* The Android SDK (software development kit) is a set of
development tools used to develop applications for Android
platform. The Android SDK includes the following:
* Required libraries
* Debugger
* An emulator
* Relevant documentation for the Android application program
interfaces (APIs)
* Sample source code
* Tutorials for the Android OS
Android Development Tools (ADT)
* The android developer tools let you create interactive and powerful application for
android platform.
* 1. Android Studio
* Developed by Google, Android Studio is an all-rounder integrated development
environment. Android has Gradle-base support that has features like visual layout
editor, intelligent code editor, real-time profilers and APK analyzer.
* 2. Visual Studio – Xamarin
* Xamarin was launched in 2011 which is the best free IDE for delivering an enterprise-
quality, cross-platform approach. Xamarin supplies add-ins to Microsoft Visual
Studio that allows developers to build Android, iOS, and Windows apps within the IDE
* 3. IntelliJ IDEA
* Using this IDE, you can do in-depth coding, quick navigation, and error analysis. It
supports mobile app development with the help of Java, Scala, Kotlin, Groovy.
* 4. Eclipse IDE
* It is one of the most popular IDES of Android apps. The open-source software is free
to use. Released under the Eclipse Public License, it holds a large community having
plenty of plugins and configurations. Highly customizable offers full support for Java
programming language and XML.
Android Virtual Devices (AVDs)
* An Android Virtual Device (AVD) is a configuration that
defines the characteristics of an Android phone, tablet, Wear
OS, Android TV, or Automotive OS device that you want to
simulate in the Android Emulator.
* The AVD Manager is an interface you can launch from Android
Studio that helps you create and manage AVDs.

* To open the AVD Manager, do one of the following:


* Select Tools > AVD Manager.

* Click AVD Manager in the toolbar.


*Android Emulator
* The Android emulator is an Android Virtual Device
(AVD), which represents a specific Android device.

* We can use the Android emulator as a target device to execute


and test our Android application on our PC.

* The Android emulator provides almost all the functionality of a


real device.

* We can get the incoming phone calls and text messages. It also
gives the location of the device and simulates different
network speeds.

* Android emulator simulates rotation and other hardware


sensors. It accesses the Google Play store, and much more
*Android Emulator

To start the emulator:


1. Open the AVD Manager.
2. Double-click an AVD, or click Run

The Android Emulator loads.


Dalvik Virtual Machine (DVM)
• The Dalvik Virtual Machine (DVM) is an android virtual machine
optimized for mobile devices. It optimizes the virtual machine
for memory, battery life and performance.
• The Dex compiler converts the class files into the .dex file that run on
the Dalvik VM. Multiple class files are converted into one dex file.

* Fig.: The compiling and packaging process from the source file
Dalvik Virtual Machine (DVM)
• The javac tool compiles the java source file into the class file.
• The dx tool takes all the class files of your application and generates
a single .dex file. It is a platform-specific tool.
• The Android Assets Packaging Tool (aapt) handles the packaging
process.
Difference between JVM and DVM
DVM (Dalvik Virtual Machine) JVM (Java Virtual Machine)

It is Register based which is designed to run


It is Stack based.
on low memory.

DVM uses its own byte code and runs “.Dex”


JVM uses java byte code and runs “.class”
file. From Android 2.2 SDK Dalvik has got a
file having JIT (Just In Time).
Just in Time compiler

DVM has been designed so that a device can


Single instance of JVM is shared with
run multiple instances of the VM efficiently.
multiple applications.
Applications are given their own instance.

DVM supports Android operating system


JVM supports multiple operating systems.
only.

For DVM very few Re-tools are available. For JVM many Re-tools are available.

There is constant pool for every


It has constant pool for every class.
application.
Here the executable is APK. Here the executable is JAR.
Installation
* Java
1. Visit
http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. Install it.
* 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.
7. Follow the setup wizard to install Android Studio and any necessary SDK
tools.
8. On some Windows systems, the launcher script does not find where Java is
installed. If you encounter this problem, you need to set an environment
variable indicating the correct location.
9. Select Start menu > Computer > System Properties > Advanced System
Properties. Then open Advanced tab > Environment Variables and add a
new system variable JAVA_HOME that points to your JDK folder, for
example C:\Program Files\Java\jdk1.7.0_45
Installation
10.The individual tools and other SDK packages are saved
outside the Android Studio application directory. If you need
to access the tools directly, use a terminal to navigate to the
location where they are installed. For example:
11.\Users\<user>\sdk\
12.Android Studio is now ready and loaded with the Android
developer tools, but there are still a couple packages you
should add to make your Android SDK complete.
* Run
1. Run Android Studio as Administrator.
2. Before you create new project, click Configure from splash
screen. Click SDK Manager.
3. Don’t select all. In bottom, in Extra section, select Intel x86
Emulator Accelerator.
4. Click Install button.
Installation
* launched android-studio-ide-181.5056338-windows.exe to start the
installation process. The installer responded by presenting the Android
Studio Setup dialog box shown in Figure 1.

* 1. Set up Android Studio


* Clicking Next will take you to the following panel, which provides the
option to decline installing an Android Virtual Device (AVD).
Installation
* chose to keep the default settings.

* After clicking Next, the Configuration Settings panel will be shown,


Installation
* where you will be asked to choose where to install Android
Studio.
Installation
* clicking Next will open Choose Start Menu Folder panel.

* keep the default setting and click Install


Installation
* The following Installing panel will appear:

* When installation finished, the Installation Complete panel appeared.


Installation
* When installation finished, the Installation Complete panel
appeared.
Installation

* After clicking Next, the installer presented the Completing Android Studio
Setup panel.

* To complete the installation, leave Start Android Studio box checked and click Finish.
Running Android Studio
* The first time Android Studio runs, it presents a Complete Installation dialog box that
offers the option of importing settings from a previous installation.

* choose not to import settings (the default selection) and click OK, the following splash
screen will appear:
Running Android Studio

* You will observe the following Finding Available SDK Components message
box.
Running Android Studio
* Android Studio will present the following Android Studio Setup
Wizard dialog box:
Running Android Studio
* Click Next, and the wizard will invite you to select an
installation type. Keep the default standard setting.
Running Android Studio
* Then you can choose a user interface theme.
Running Android Studio
* You can choose whichever you want and click Next. Android
Studio will next provide the opportunity to verify settings.
Running Android Studio
* click Finish and Android Studio will begin the process of
downloading SDK components.
Running Android Studio
* It can take several minutes for this part of the setup to finish.
Running Android Studio
* Finally, click Finish to complete the wizard. The Welcome to Android Studio dialog box
appear.

* This dialog box is used to start up a new Android Studio project, work with an existing
project, and more. It can be accessed by selecting Android Studio from the
Windows Start menu, or the equivalent on another platform.

You might also like