IS 238: Mobile Application Development (8 Credits) : Instructor: Dr. Kennedy

You might also like

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

IS 238 : Mobile Application Development

(8 credits)

Lecture :
Instructor : Dr. Kennedy Wednesday 07:00 – 09:00
E-mail: kenfactz@gmail.com Room: D01 (LUHANGA HALL)

Practical:
Friday 14:00 – 16:00
1
Unit II: Mobile Programming

2
Introduction to android

⚫ What is a 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)

➢ Allows writing managed code in the Java language

➢ Unveiling of the Android platform was announced on 5


November 2007 with the founding of OHA
Introduction to android

Why android?
Features of android

⚫ The base Android OS supports many features, including:


➢ Storage - SQLite, a lightweight relational database, for data
storage.
➢ Connectivity - GSM/EDGE, IDEN, CDMA, EV-DO, UMTS,
Bluetooth (includes A2DP and AVRCP), Wi-Fi, LTE, and
WiMAX.
➢ Messaging - Both SMS and MMS.
➢ Media support - 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.
Features of android

➢ Hardware support - Accelerometer sensor, camera, digital


compass, proximity sensor, and GPS.
➢ Multi-touch - Multi-touch screens.
➢ Multi-tasking - Multi-tasking applications.
➢ Tethering -Sharing of Internet connections as a wired/wireless
hotspot.
➢ Web browser - Based on the open-source WebKit layout
engine, coupled with Chrome's V8 JavaScript engine supporting
HTML5 and CSS3.
Android devices in the market

⚫ Android devices come in all shapes and sizes including, but not
limited to, the following types
➢ Smartphones
➢ Tablets
➢ E-reader devices
➢ Internet TVs
➢ Automobiles
➢ Smartwatches
Pre-installed android applications

⚫ Android devices typically come with a suite of preinstalled


applications that users expect. On smartphones these typically
include

➢ A phone dialer ➢ A music player and picture gallery


➢ An SMS management application ➢ A camera and video recording
➢ A web browser application
➢ An e-mail client ➢ A calculator
➢ A calendar ➢ A home screen
➢ A contacts list ➢ An alarm clock
Android devices in the market

⚫ In many cases Android devices also ship with the following


proprietary Google mobile applications:
➢ The Google Play Store for downloading third-party Android
applications
➢ The Google Maps application, including StreetView, driving
directions, and turn-by-turn
➢ navigation, satellite views, and traffic conditions
➢ The Gmail email client
➢ The YouTube video player
➢ The Google Chrome browser
➢ The Google home screen and Google Assistant
Android Architecture/Platform

⚫ The Android OS is roughly divided into five sections in four main


layers as shown in figure 1:
Android Architecture/Platform

⚫ The Android OS is roughly divided into five sections in four main


layers as shown in figure 1:
Android Architecture/Platform

⚫ Linux kernel
➢ This is the kernel on which Android is based.
➢ Core services (including hardware drivers, process and memory
management, security, network, and power management) are
handled by a Linux kernel (the specific kernel version depends
on the Android platform version and hardware platform).
⚫ Libraries
➢ These contain the code that provides the main features of an
Android OS. For example
➢ The SQLite library provides database support so that an
application can use it for data storage.
➢ A media library for playback of audio and video media.
➢ The WebKit library provides functionalities for web browsing.
Android Architecture/Platform

⚫ Android runtime
➢ The Android runtime is located in the same layer with the
libraries and provides a set of core libraries that enable
developers to write Android apps using the Java programming
language.
➢ The Android runtime also includes the Dalvik virtual machine
➢ It enables every Android application to run in its own process,
with its own instance of the Dalvik virtual machine.
➢ Android applications are compiled into Dalvik executables.
➢ Dalvik is a specialized virtual machine designed specifically for
Android and optimized for battery-powered mobile devices with
limited memory and CPU power.
Android Architecture/Platform

⚫ Application framework
➢ The application framework exposes the various capabilities of the
Android OS to application developers so that they can make use of
them in their applications.
➢ The application framework provides the classes used to create
Android applications.
➢ It also provides a generic abstraction for hardware access and
manages the user interface and application resources
⚫ Applications
➢ At this top layer are the applications that ship with the Android
device (such as Phone, Contacts, Browser, and so on), as well as
applications that you download and install from the Android Market.
➢ Any applications that you write are located at this layer.
Android Architecture/Platform

⚫ Applications
➢ At this top layer are the applications that ship with the Android
device (such as Phone, Contacts, Browser, and so on), as well
as applications that you download and install from the Android
Market.
➢ Any applications that you write are located at this layer.
Required tools

⚫ Before you write your first app, you need to download the required
tools
➢ For Android development, you can use a Mac, a Windows PC,
or a Linux machine
➢ The Android Studio makes use of the Java SE Development Kit
(JDK). If your computer does not have the JDK installed, you
should download it from oracle website www.oracle.com
➢ Make sure you have oracle account before download JDK
Required tools

⚫ Android Studio
➢ The first and most important piece of software you need to
download is Android Studio 4 i.e. the latest stable version
➢ It is the official IDE (Integrated Development Environment) for
Android development, created by Google. You can use it to build
Android apps on Windows, Linux, and MacOs operating
systems.
➢ Android Studio provides the fastest tools for building apps on
every Android device
➢ Android Studio supports all programming languages you can use
for Android development: Java, C/C++, and Kotlin.
➢ This IDE is based on IntelliJ IDEA (a popular Java IDE), which
offers a powerful code editor and developer tools.
Required tools

➢ It comes bundled with Android SDK (Software Development Kit)


and some additional development tools such as AVD Manager
and Android Debug Bridge.
➢ Android Studio includes a visual layout editor, an APK (Android
Package) analyzer, an Android device emulator, and real-time
performance profiling tools, too.
Required tools

⚫ Android SDK
➢ The Android SDK is a development kit for Android. It includes a
complete set of development and debugging tools.
➢ The Android SDK is composed of modular packages that you
can download separately using the Android SDK Manager. The
toolkit includes:
❖ SDK tool
❖ SDK platform tools
❖ SDK documentation
❖ Android SDK resources
❖ SDK example
❖ Google API
❖ Android support
Required tools

⚫ AVD Manager
➢ AVD Manager is a built-in tool of Android Studio.
➢ AVD stands for Android Virtual Device.
➢ It makes it possible to create virtual Android devices for testing
purposes.
➢ An AVD is a configuration that describes the characteristics of a
virtual device such as hardware profile, storage area,
appearance, system image, and other attributes.
➢ AVD enables you to create as many AVDs as you want.
➢ You can access your virtual devices for testing purposes in the
Android Emulator that also comes bundled with Android
Installing "Android Studio IDE" and "Android
SDK"

⚫ Windows requirements
➢ 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)
➢ 4 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
Installing "Android Studio IDE" and "Android
SDK"

⚫ Step 1. Install Oracle Java Development Kit ("JDK")


➢ Android apps are written in Java.
➢ You need the Oracle Java compiler and libraries on your system.
➢ These are collectively called the Java Development Kit or "JDK"
for short
➢ Required JDK 1.8 or higher
➢ Download JDK installer (x86 or x64) from oracle website and
follow all the required steps to install on your windows machine.
➢ Finally, make sure that environment variable JAVA_HOME is set
to the JDK installation directory
Installing "Android Studio IDE" and "Android
SDK"

⚫ Step 2. Install Android Studio IDE


➢ Uninstall older version(s) of "Android Studio" and "Android SDK",
if any.
➢ Go to "Android Studio" @ https://developer.android.com/studio
⇒ Click "Download 4.1.1 for Windows 64-bit
➢ Run the downloaded installer ⇒ You may watch a short video @
https://developer.android.com/studio/install.
❖ In "Choose Components", select "Android Studio" and "Android Virtual
Device".
❖ In "Configuration Settings Install Location", accept the default
"C:\Program Files\Android\Android Studio".
❖ In "Choose Start Menu Folder", accept the default ⇒ Install.
❖ Launch Android Studio. Continue to the next Step.
END OF LECTURE

You might also like