KEMBAR78
Lecture 02 | PDF | Android (Operating System) | Kernel (Operating System)
0% found this document useful (0 votes)
22 views38 pages

Lecture 02

The document outlines a course on Android Development, covering topics such as mobile technologies, application creation, user interface design, and Android's operating system history. It details the evolution of Android from its inception in 2003 to its current status as a leading mobile OS, highlighting key developments and features. Additionally, it discusses the Android application architecture, development environment setup, and types of Android applications.

Uploaded by

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

Lecture 02

The document outlines a course on Android Development, covering topics such as mobile technologies, application creation, user interface design, and Android's operating system history. It details the evolution of Android from its inception in 2003 to its current status as a leading mobile OS, highlighting key developments and features. Additionally, it discusses the Android application architecture, development environment setup, and types of Android applications.

Uploaded by

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

Mobile Application Development

IC 2305

INTRODUCTION TO ANDROID
DEVELOPMENT
Mr. Chathura Mahasen Bandara
(Lecturer – p)
Department of Information and
Communication Technology,
University of Colombo
COURSE OUTLINE
▸ Introduction to Mobile Technologies and Applications
▸ Introduction to Android Development
▸ Creating Applications and Activities
▸ Designing User Interfaces
▸ Intents and Broadcast Receivers
▸ Android Network Programming
▸ Files, Saving State, and Preferences
▸ Databases and Content Providers
▸ Background Threads
▸ User Experience
HISTORY OF ANDROID
▸ Android Inc. was founded in Palo Alto, California, in 2003
by Andy Rubin, Rich Miner, Nick Sears, and Chris White.

▸ The early intentions of the company were to develop an


advanced operating system for digital cameras.

▸ The company then decided that the market for cameras


was not large enough for its goals.

▸ Five months later diverted its efforts and was pitching


Android as a handset operating system.

▸ Rubin had difficulty attracting investors early on, and


Android was facing eviction from its office space.
HISTORY OF ANDROID
▸ Steve Perlman, a close friend of Rubin, brought him $10K in
cash in an envelope, and shortly thereafter wired an
undisclosed amount as seed funding, refusing a stake.

▸ In 2005, Google acquired Android Inc. for at least $50 million.

▸ Its key employees, including Rubin, Miner and White, joined


Google as part of the acquisition.

▸ At Google, the team led by Rubin developed a mobile device


platform powered by the Linux kernel.

▸ Speculation about Google's intention to enter the mobile


communications market continued to build through 2006.
HISTORY OF ANDROID
▸ An early prototype had a close resemblance to a BlackBerry
phone, with no touchscreen.

▸ But the arrival of Apple iPhone (June 2007) meant that Android
"had to go back to the drawing board”.

▸ On November 2007, the Open Handset Alliance, a consortium of


technology companies including Google, device manufacturers,
wireless carriers, and chipset makers, unveiled itself, with a goal to
develop "the first truly open and comprehensive platform for
mobile devices".

▸ By 2008, both Nokia and BlackBerry announced touch-based


smartphones to rival the iPhone 3G, and Android's focus
eventually switched to just touchscreens.
HISTORY OF ANDROID
▸ The first commercially available smartphone running Android was
the HTC Dream (T-Mobile G1), announced on September 23,
2008.

▸ Since 2008, Android has seen numerous updates which have


incrementally improved the operating system.

▸ In 2010, Google launched its Nexus series of devices, a lineup in


which Google partnered with different device manufacturers to
produce new devices and introduce new Android versions.
HISTORY OF ANDROID
▸ In June 2014, Google announced Android One, a set of
"hardware reference models" that would "allow [device
makers] to easily create high-quality phones at low costs”.

▸ Google introduced the Pixel and Pixel XL smartphones in


October 2016, marketed as being the first phones made
by Google.

▸ In May 2019, the operating system became entangled in


the trade war between China and the United States
involving Huawei.

▸ Kotlin-first Development announced in Google I/O 2019.


ANDROID OPERATING SYSTEM
▸ Android is a mobile operating system based on a modified
version of the Linux kernel and other open source software,
designed primarily for touchscreen mobile devices such as
smartphones and tablets.

▸ Android is developed by a consortium of developers known


as the Open Handset Alliance, with the main contributor
and commercial marketer being Google.

▸ The current stable version is Android 15, released on


October 15, 2024.

▸ The core Android source code is known as Android Open


Source Project (AOSP).
ANDROID ROBOT
ANDROID OS VERSIONS
▸ During its announcement of Android KitKat in 2013,
Google explained that "Since these devices make our lives
so sweet, each Android version is named after a dessert”.
ANDROID
OS
VERSIONS
https://developer.android.com/about/versions
ANDROID OS VERSIONS
ANDROID OS FRAGMENTATION
▸ Android fragmentation refers to a concern over the alarming
number of different available Android operating system (OS)
versions in the market.
ANDROID STATISTICS
▸ Android has been the best-selling OS worldwide on
smartphones since 2011 and on tablets since 2013.

▸ In Google I/O 2019, Google announced that there are now


over 2.5 billion monthly active Android devices worldwide.

▸ There are over 2.26 million available apps at Google


Play Store.

▸ Android holds over 80% of the total market share of


mobile operating systems.
APP DOWNLOADS
▸ In 2018, 76 billion downloads were made through Google
Play.
APP DOWNLOADS
ANDROID PLATFORM ARCHITECTURE / SOFTWARE STACK

Hardware Abstraction Layer


LINUX KERNEL
▸ The foundation of the Android platform is the Linux kernel.
For example, the Android Runtime (ART) relies on the
Linux kernel for underlying functionalities such as
threading and low-level memory management.

▸ Using a Linux kernel allows Android to take advantage of


key security features and allows device manufacturers to
develop hardware drivers for a well-known kernel.
HAL (HARDWARE ABSTRACTION LAYER)
▸ Provides standard interfaces that expose device hardware
capabilities to the higher-level Java API framework.

▸ Consists of multiple library modules, each of which implements an


interface for a specific type of hardware component, such as the
camera or bluetooth module.

▸ When a framework API makes a call to access device hardware,


the Android system loads the library module for that hardware
component.
ANDROID RUN TIME (ART)
▸ ART is written to run multiple virtual machines on low-memory
devices by executing DEX files, a bytecode format designed
specially for Android, optimized for minimal memory footprint.

▸ For devices running Android version 5.0 (API level 21) or higher,
each app runs in its own process and with its own instance of ART.

▸ Some of the major features of ART include: AOT, JIT compilation,


Optimized garbage collection—better debugging support.
NATIVE LIBRARIES
▸ Many core Android system components and services, such as ART
and HAL, are built from native code that require native libraries
written in C and C++.

▸ Native libraries includes: core libraries such as libc, SSL, media


library for playback of audio and video, surface manager for
display management, graphics libraries, SQLite, Webkit.

▸ Android NDK to access some of these native platform libraries.


ANDROID FRAMEWORK (JAVA API FRAMEWORK)
▸ The entire feature-set of the Android OS is available through APIs
written in the Java language.

▸ APIs form the building blocks to create Android apps by


simplifying the reuse of core, modular system components and
services.
APPLICATIONS
▸ Android comes with a set of core apps for email, SMS messaging,
calendars, internet browsing, contacts, and more.

▸ Apps included with the platform have no special status among the
apps the user chooses to install.

▸ The system apps function both as apps for users and to provide
key capabilities that developers can access from their own app.

▸ The application layer runs within the Android Run Time, using the
classes and services made available from the application
framework.
ANDROID APPLICATION ARCHITECTURE
▸ Android’s architecture encourages component reuse,
enabling you to publish and share Activities, Services, and
data with other applications, with access managed by the
security restrictions you define.

▸ The same mechanism that enables you to produce a


replacement contact manager or phone dialer can let you
expose your application’s components in order to let other
developers build on them by creating new UI front ends or
functionality extensions.

▸ Following application services are the architectural


cornerstones of all Android applications:
ANDROID APPLICATION ARCHITECTURE(APPLICATION
FRAMEWORK)
▸ Activity Manager and Fragment Manager—Activities and
Fragments are used to define the user interface of your apps.

▸ Views—Used to construct the user interfaces controls within your


Activities and Fragments.

▸ Notification Manager—Provides a consistent and nonintrusive


mechanism for signaling your users.

▸ Content Providers—Lets your applications share data.

▸ Resource Manager—Enables non-code resources, such as strings


and graphics, to be externalized.

▸ Intents—Provides a mechanism for transferring data between


applications and their components.
ANDROID FUNDAMENTALS
▸ Compiled Java code and resources are bundled into an .apk
file.

▸ Each .apk file is considered an application.

▸ By default, every application runs in its own Linux process with


its own JVM so code runs in isolation from other applications.

▸ Resources are included as external elements and references in


the application.

▸ Every Android project needs a file called R.java, which is


created for you and which lives in the generated/ source folder.
Android uses this file to keep track of resources in the app.
ANDROID FUNDAMENTALS
▸ An activity is a single, defined thing that your user can do.

▸ A layout describes the appearance of the screen. Layouts


are written as XML files and they tell Android how different
screen elements are arranged.

▸ Services run in the background for an indefinite period of


time.
ANDROID NATIVE APPLICATION DEVELOPMENT
▸ Java, Kotlin, and C++ programming languages can be
used to develop Android Native Applications.

▸ Android SDK (software development kit) bundled with


Android Studio is the official IDE (integrated development
environment) for Android.
ANDROID STUDIO
▸ Android Studio is a special version of IntelliJ IDEA that interfaces with the
Android Software Development Kit (SDK) and the Gradle build system.

▸ The official IDE for development, debugging, testing, profiling, and


distribution.

▸ Android Studio projects use the Gradle build system to compile and
deploy apps. Gradle projects have a standard structure.

▸ Android Studio provides a graphical interface to Gradle, and also to other


tools for creating layouts, reading logs, and debugging.

▸ The emulator enables you to set up one or more Android virtual devices
(AVDs) and then run your app in the emulator as though it’s running on a
physical device. The emulator is built on an existing emulator called
QEMU.
ANDROID STUDIO FEATURES
▸ A flexible Gradle-based build system.

▸ A fast and feature-rich emulator.

▸ A unified environment where you can develop for all Android devices.

▸ Apply Changes to push code and resource changes to your running app without
restarting your app.

▸ Code templates and GitHub integration to help you build common app features
and import sample code.

▸ Extensive testing tools and frameworks.

▸ Lint tools to catch performance, usability, version compatibility, and other


problems.

▸ C++ and NDK support.

▸ Built-in support for Google Cloud Platform.


SETTING UP DEVELOPMENT ENVIRONMENT
▸ Install Android Studio
https://developer.android.com/studio/install

▸ Each project in Android Studio contains one or more


modules with source code files and resource files.
PROJECT STRUCTURE
Toolbar Navigation Bar Editor Window

Tool Window Bar

Tool Windows

Status Bar
USEFUL SHORTCUTS
▸ Reformat Code Control+Alt+L

▸ Search Everything Press Shift twice

▸ Find in File Control+F

▸ Find in Path Control+Shift+F


TYPES OF ANDROID APPLICATIONS
▸ Native Apps, Hybrid Apps, Mobile Web Apps. (Refer
Lecture 01 for Details).

▸ Categories: Games, Social, Business & Finance, Education,


Kids, Health & Fitness, Productivity, Lifestyle, Art & Design,
Beauty & Fashion, Maps & Navigation, Music & Audio,
Video Players & Editors, News & Magazines, Sports,
Shopping, Augmented Reality
PREPARATIONS FOR NEXT LECTURE
▸ Install Android SDK

▸ Read Java Code Style Rules


https://source.android.com/setup/contribute/code-style

▸ Optionally Read Design Patterns eBook

▸ Questions

▸ Email – chathura@ict.cmb.ac.lk

You might also like