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

Introduction to Android

Introduction to course
 Course objective
 Course outcome
 Pre-requirements
– Object oriented programming (ICSI201)
– Java programming
 Evaluation
– Laboratories: 50 points
– Mid-term exam: 15 points
– Final exam: 35 points

Introduction to Android 2
Introduction
 What is Android?
• A software platform and operating system for mobile devices
• Based on the Linux kernel
• Developed by Google and later the Open Handset Alliance
(OHA)
• Unveiling of the Android platform was announced on 5
November 2007 with the founding of OHA

Introduction to Android 3
Introduction
 What is the Open Handset Alliance (OHA)?

Introduction to Android 4
OHA

Introduction to Android 5
MarketShare

http://goo.gl/UVFoMk

Introduction to Android 6
Android Software Architecture

Introduction to Android 7
Applications

 Android provides a set of core applications:


 Email Client
 SMS Program
 Calendar
 Maps
 Browser
 Contacts
 Etc

 All applications are written using the Java language.

Introduction to Android 8
App Framework

 Enabling and simplifying the reuse of components


 Developers have full access to the same framework
APIs used by the core applications.
 Users are allowed to replace components.

Introduction to Android 9
Libraries

 Including a set of C/C++ libraries used by components of


the Android system
 Exposed to developers through the Android application
framework

Introduction to Android 10
Runtime

 Core Libraries
 Providing most of the functionality available in the
core libraries of the Java language
 APIs
 Data Structures
 Utilities
 File Access
 Network Access
 Graphics
 Etc

Introduction to Android 11
Runtime/2/
 Dalvik Virtual Machine
 Providing environment on which every Android
application runs
 Each Android application runs in its own process, with its
own instance of the Dalvik VM.
 Dalvik has been written such that a device can run
multiple VMs efficiently.

 Register-based virtual machine

Introduction to Android 12
Runtime/3/
 Dalvik Virtual Machine (Cont)
 Executing the Dalvik Executable (.dex) format
 .dex format is optimized for minimal memory footprint.
 Compilation

 Relying on the Linux Kernel for:


 Threading
 Low-level memory management

Introduction to Android 13
Linux Kernel

 Relying on Linux Kernel 2.6 for core system services


 Memory and Process Management
 Network Stack
 Driver Model
 Security
 Providing an abstraction layer between the H/W and the rest of
the S/W stack

Introduction to Android 14
Platform Versions
 Current Distribution

http://goo.gl/K9VCFo
Introduction to Android 15
Platform Versions
 Screen Sizes and Densities

Introduction to Android 16
Software development
 Operating system
• Microsoft windows(XP or later)
• Mac OS X 10.4.8 or later(Intel chips only)
• Linux
 Development requirements 
• JDK 6 
• Android SDK
• Android studio or Eclipse

Introduction to Android 17
Software development
IDE and Tools
 Android SDK
• Class Library
• Developer Tools
• Emulator
• Documentation and Sample Code

 Android studio
• android sdk
• ADT

Introduction to Android 18
Software development
Programming Language(s)
• Java or Kotlin – officially supported
• C/C++

Introduction to Android 19
Downloading Android SDK

Introduction to Android 20
Installing Android SDK

Introduction to Android 21
Installing Android SDK

Introduction to Android 22
Developing with Eclipse
Eclipse 3.4 or 3.5(Galileo)
 Installing the ADT plug-in
– Help-> Install New Software
• https://dl-ssl.google.com/android/eclipse/

Introduction to Android 23
Android SDK location on Eclipse

Introduction to Android 24
Android SDK location on Eclipse/1
Window->preferences

Introduction to Android 25
Android studio - System Requirements
 Windows
 Microsoft® Windows® 7/8/10 (32- or 64-bit)
 2 GB RAM minimum, 8 GB RAM recommended
 2 GB of available disk space minimum,
4 GB Recommended (500 MB for IDE + 1.5 GB for
Android SDK and emulator system image)
 1280 x 800 minimum screen resolution
 Java Development Kit (JDK) 8
 For accelerated emulator: 64-bit operating system
and Intel® processor with support for Intel® VT-x,
Intel® EM64T (Intel® 64), and Execute Disable (XD)
Bit functionality

Introduction to Android 26
Install Android Studio
 Install JDK 8
 Set Environment Variables
– 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.8.0_77.
 Download Android Studio
– https://developer.android.com/studio/index.html

Introduction to Android 27
Types of android applications
 Foreground
– activity
 Backround
– service
 Intermittent
– User interface and backround
 Widget
– Home screen widget

Introduction to Android 28
Creating a first app
 File menu, select New Project
Application specifics:
– Application name
– Package name 
– Company Domain
– Project location 
– platform
 Select Target Android Devices
 Empty activity
 Finish

Introduction to Android 29
Running Your App
 Run on a Real Device
– Install Google usb driver(Android sdk manager)
– OEM USB Drivers: http://goo.gl/DxiwpA
• https://developer.android.com/studio/run/oem-usb.html
– Connect usb cable
– Enable Device USB debugging
• Settings > Developer options.
• If developer options hidden: http://goo.gl/5P6QoV
 Run on the Emulator
– The Android Emulator simulates a device and
displays it on your development computer.
– If First use New virtual device(AVD manager)

Introduction to Android 30
Android development tools
 Android SDK manager
– Manage sdk and Tools
 Virtual device Manager
– Create, delete and edit virtual device
 Android emulator
– Test
– Debug
 Dalvik Debug Monitor Monitoring Service(DDMS)
Virtual device monitor
– Monitor and Control Dalvik virtual machine

Introduction to Android 31
AVD
AVD Manager New virtual device
 Select virtual device profile
 Select api level

Introduction to Android 32
Android emulator

Introduction to Android 33
DDMS – Virtual device monitor

Introduction to Android 34

You might also like