Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

IF 633

Mobile Application Programming


01 Introduction to the Android Operating System
OBJECTIVES
▪ Explain and define what is Android Operating System
▪ Explain what is Android’s platform Architecture
▪ Explain the history and evolution of Android Operating System
▪ Explain the challenges of Android app Development
▪ Explain what is Android app fundamentals
▪ Explain and describe the main tools to develop Android app – Android
Studio
OUTLINE
▪ Android is an ecosystem
▪ Android platform architecture
▪ Android History
▪ Android Versions
▪ Challenges of Android app development
▪ App fundamentals
▪ Android Studio
▪ Basic app development workflow with Android Studio
▪ Running apps on virtual and physical devices
What is Android?

▪ Mobile operating system based on Linux kernel


▪ User Interface for touch screens
▪ Used on over 80% of all smartphones
▪ Powers devices such as watches, TVs, and cars
▪ Over 2 Million Android apps in Google Play store
▪ Highly customizable for devices / by vendors
▪ Open source
Birth of Android Operating System
▪ October 2003, the company Android Inc was founded in Palo Alto, California,
USA
▪ Its four founders were Rich Miner, Nick Sears, Chris White, and Andy Rubin

Andy Rubin Rich Miner Nick Sears Chris White


Android Inc
Android OS Initiations
• Mobile phone dominated by Symbian OS.
• Android was intended to be installed in Digital Camera.
2003

• Digital Camera markets are declining.


• Idea of delivering contents based on user’s location and
2004 preferences in mobile phone.

• Open Handset Alliance (OHA) was initiated by Google, HTC,


Motorola, Qualcomm, Texas Instrument, etc. (35 Members)
• Published Android SDK for developers to compete with
Andy Rubin 2007 BlackBerry, iPhone (iOS), Symbian and other platforms.
Key Person / Co-Founder
Android versions
Codename Version Released API Level
1.0 Sept 2008

1.1 Feb 2009

Cupcake 1.5 April 2009

Donut 1.6 Sept 2009

Eclair 2.0 – 2.1 Oct 2009


Froyo 2.2 May 2010

Gingerbread 2.3 Sept 2010


Android versions
Codename Version Released API Level
Honeycomb 3.0 - 3.2.6 Feb 2011 11 - 13

Ice Cream Sandwich 4.0 - 4.0.4 Oct 2011 14 - 15

Jelly Bean 4.1 - 4.3.1 July 2012 16 - 18

KitKat 4.4 - 4.4.4 Oct 2013 19 - 20

Lollipop 5.0 - 5.1.1 Nov 2014 21 - 22


Marshmallow 6.0 - 6.0.1 Oct 2015 23

Nougat 7.0 - 7.1 Sept 2016 24 - 25

Oreo 8.0 - 8.1 Sept 2017 26 - 27

Pie 9.0 Aug 2018 28


Mobile OS Market Share (Forecast)
Android user interaction and Sensors
● User Interactions
● Touch gestures: swiping, tapping, pinching
● Virtual keyboard for characters, numbers, and emoji
● Support for Bluetooth, USB controllers and peripherals
● Sensors
● Device contents rotate as needed
● Walking adjusts position on map
● Tilting steers a virtual car or controls a physical toy
● Moving too fast disables game interactions
Android Software Developer Kit (SDK)

● Development tools (debugger, monitors, editors)


● Libraries (maps, wearables)
● Virtual devices (emulators)
● Documentation (developers.android.com)
● Sample code
Android Studio
● Official Android IDE
● Develop, run, debug,
test, and package apps
● Monitors and
performance tools
● Virtual devices
● Project views
● Visual layout editor
Google Play store

Publish apps through Google Play store:


● Official app store for Android
● Digital distribution service operated by Google
Android stack
1. System and user apps
2. Android OS API in
Java framework
3. Expose native APIs;
run apps
4. Expose device
hardware capabilities
5. Linux Kernel
System and user apps

● System apps have no special status


● System apps provide key capabilities to app developers

Example:
Your app can use a system app to
deliver a SMS message.
Java API Framework

The entire feature-set of the Android OS is available to


you through APIs written in the Java language.
● View class hierarchy to create UI screens
● Notification manager
● Activity manager for life cycles and navigation
Android runtime, C/C++ libraries, & HAL
▪ Android runtime
▪ Each app runs in its own process with its own instance of the
Android Runtime.
▪ C/C++ libraries
▪ Core C/C++ Libraries give access to core native Android system
components and services.
▪ Hardware Abstraction Layer (HAL)
▪ Standard interfaces that expose device hardware capabilities as
libraries
Examples: Camera, bluetooth module
Linux Kernel

● Threading and low-level memory management


● Security features
● Drivers
What is an Android app?

● One or more interactive screens


● Written using Java Programming Language and XML
● Uses the Android Software Development Kit (SDK)
● Uses Android libraries and Android Application Framework
● Executed by Android Runtime Virtual machine (ART)
Challenges of Android development

● Multiple screen sizes and resolutions


● Performance: make your apps responsive and smooth
● Security: keep source code and user data safe
● Compatibility: run well on older platform versions
● Marketing: understand the market and your users
(Hint: It doesn't have to be expensive, but it can be.)
App building blocks

● Resources: layouts, images, strings, colors as XML and


media files
● Components: activities, services, and helper classes as Java
code
● Manifest: information about app for the runtime
● Build configuration: APK versions in Gradle config files
Workflow of Building Android Application
Development Phase with Android Standard Development Kit (SDK)

2 3 4
Dex File (*.dex)
(Bytecode file like
*.exe in Windows)

Logic : Java Code Build Automation Java Compiler + DX


1 Tools : Gradle (D8) Compiler

5
5
Developers

User Interface and APK Packager


Resources : XML Script, (Like 7Zip or WinZip)
Output: APK File
PNG, JPG, etc.
(Like *.appx in Windows 10 or
.deb in Debian)
Workflow of Android Application Runtime
End-User Runtime on Device while using Application

App Requesting Permission and Dex File (*.dex)


Installation Confirmation
Resources File

3
Compiler: dex2oat tool

Libraries
1 2
4

Users Download
APK through Play
Store or External
Sources
5 Using The App

Registered Apps Android Runtime (ART)


Basic Developer Workflow
What is Android Studio?
● Android integrated development environment (IDE)
● Project and Activity templates
● Layout editor
● Testing tools
● Gradle-based build
● Log console and debugger
● Emulators
Android Studio interface
1. Toolbar
2. Navigation bar
3. Project pane
4. Editor
5. Tabs for other
panes
Project folders
1. manifests—Android Manifest
file - description of app read
by the Android runtime
2. java—Java source code
packages
3. res—Resources (XML) -
layout, strings, images,
dimensions, colors...
4. build.gradle—Gradle build
files
Gradle build system
● Modern build subsystem in Android Studio
● Three build.gradle:
○ project
○ module
○ settings

● Typically not necessary to know low-level Gradle details


● Learn more about gradle at https://gradle.org/
Run your app

1. Run

2. Select virtual
or physical
device

3. OK
Result on Run

Run on a virtual device Run on a Physical device


Summary
▪ After finishing this module, you should be able:
▪ to understand Android Operating System
▪ to understand what Android’s platform Architecture is
▪ to understand the history and evolution of Android Operating
System
▪ to understand what the challenges of Android app Development
are
▪ to understand what Android app fundamentals is
▪ to understand the main tools to develop Android app – Android
Studio
NEXT WEEK’S OUTLINE
 Android Activity
 Relative Layout
 Linear Layout
 Frame Layout
 Constraint Layout
 Resources for UI
REFERENCES
▪ J.F.DiMarzio. Beginning Android Programming with Android Studio (2017).
John Wiley & Son.
▪ D. Griffiths & D. Griffiths. Head First Android Development. O’Reilly
▪ Google Developer Training Team. Android Developer Fundamental Course:
Learn to develop Android Applications. Concept Reference. (Version 2:
2018). Google Inc.
▪ https://google-developer-training.github.io/android-developer-fundamentals-
course-concepts-v2/
Visi
Menjadi Program Studi Strata Satu Informatika unggulan yang menghasilkan lulusan
INFORMATIKA

berwawasan internasional yang kompeten di bidang Ilmu Komputer (Computer


Science), berjiwa wirausaha dan berbudi pekerti luhur.

Misi
1. Menyelenggarakan pembelajaran dengan teknologi dan kurikulum terbaik serta didukung
tenaga pengajar profesional.
2. Melaksanakan kegiatan penelitian di bidang Informatika untuk memajukan ilmu dan
teknologi Informatika.
3. Melaksanakan kegiatan pengabdian kepada masyarakat berbasis ilmu dan teknologi
Informatika dalam rangka mengamalkan ilmu dan teknologi Informatika.

You might also like