2. Credits Hours 3(3,0)
Recommended Books
1. Professional Android application development, Reto Meier, Wrox Programmer to
Programmer, 2015.
2. Android Programming: The Big Nerd Ranch Guides, Phillips, B. & Hardy, B., 2nd
Edition, 2014.
3. iOS Programming: The Big Nerd Ranch Guide, Conway, J., Hillegass, A., & Keur, C.,
5th Edition, 2014.
3. Android Software Stack
Android’s mobile operating system is based upon a modified version of the Linux
kernel.
Software Stack consists of
Java applications running on java based, object oriented application framework on
the top of java core libraries running on a Dalvik virtual machine featuring a JIT
compilation.
Android Virtual Machine (DVM):
Used to write all the classes or core system services.
Services that are essential to the Android platform.
Behind the scenes - applications typically don't access them directly.
6. Difference Between Dalvik and ART in Android
Android runtime (ART) is the managed runtime used by applications and some system
services on Android. ART and its predecessor Dalvik were originally created specifically
for the Android project. ART and Dalvik are compatible runtimes running Dex bytecode,
so apps developed for Dalvik should work when running with ART.
With a newer android version specifically from 4.4 version KitKat, there is the concept of
ART as an alternative to DVM. ART(Android Run Time) is a successor of DVM which uses
the same bytecode and .dex files (but not .odex files).
Dalvik Virtual Machine or DVM is a Register-Based virtual machine that was designed
and written by Dan Bornstein. Dalvik is a discontinued process virtual machine (VM) in
the Android OS that executes applications written for Android. Dalvik bytecode format is
still used as a distribution format, but no longer at runtime in newer Android versions.
7. Difference Between Dalvik and ART in Android
DVM takes android app, turns them from java code into bytecode that the Linux system
can run. Basically, a plain java code is compiled in the JIT compiler to bytecode during
runtime to run on the machine.
There are 2 types of files:
.dex(Dalvik Executable file) file is an android’s compiled code file. These .dex files are
then zipped into a single .apk file.
.odex file is created by the Android operating system to save space and increase the boot
speed of an Android app (a .apk file).
JAVA source code(.java) –> Bytecode(.dex) –> DVM
8. What Android Isn’t
Android is not the following:
A Java ME implementation: Android applications are written using the Java language
but they are not run within a Java ME (Mobile Edition) VM, and Java-compiled classes
and executables will not run natively in Android.
A mobile phone handset: Android includes a reference design for mobile handset
manufacturers, but there is no single “Android phone.” Instead, Android has been
designed to support many alternative hardware devices.
Part of the Linux Phone Standards Forum (LiPS) or the Open Mobile Alliance (OMA):
Android runs on an open-source Linux kernel while their goals are similar, Android’s
complete software stack approach goes further than the focus of these standards-
defining organizations.
Google’s answer to the iPhone: The iPhone is a fully proprietary hardware and
software platform released by a single company (Apple), whereas Android is an open-
source software stack produced and supported by the Open Handset Alliance (OHA)
and designed to operate on any compatible device.
9. Native Android Applications
A native application is a software program that is developed for use on a particular platform
or device.
Android phones will normally come with a suite of preinstalled applications that form part of
the Android Open Source Project (AOSP), including, but not limited to: All the native
applications are written in Java using the Android SDK and are run on Dalvik.
A Gmail email client.
An SMS management application.
A full PIM (personal information management) suite, including a calendar and contacts list.
A WebKit-based web browser.
A music player and picture gallery.
A camera and video recording application.
A calculator.
A home screen.
An alarm clock.
Google Play Store for downloading third-party Android applications.
10. Android SDK Features
Android gives you the opportunity to create applications that are as much a part of the
phone as anything provided out of the box. The following list highlights some of the most
significant Android features:
No licensing, distribution and development fees.
Wi-Fi hardware access and peer-to-peer connections.
Media libraries for playing and recording a variety of audio/video or still-image formats.
Comprehensive APIs for location-based services such as GPS.
Full multimedia hardware control including playback and recording using the camera
and microphone.
Background Services, applications and processes.
11. Home-screen Widgets and Live Wallpaper.
IPC message passing.
An integrated open source WebKit-based browser.
An application framework that encourages reuse of application components and the
replacement of native applications.
GSM, EDGE, 3G, 4G and LTE networks for telephony or data transfer, enabling you to
make or receive calls or SMS messages, or to send and retrieve data across mobile
networks.
Libraries for using Bluetooth and NFC hardware for peer-to-peer data transfer.
12. What Does Android Run On?
The first Android mobile handset, the T-Mobile G1, was released in the United
States in October 2008. Android is designed to support a large variety of
hardware platforms from smartphones to tablets and televisions.
With no licensing fees or proprietary software, the cost to handset
manufacturers for providing Android devices is comparatively low. Many
people now expect that the advantages of Android as a platform for creating
powerful applications will encourage device manufacturers to produce
increasingly diverse and tailored hardware.
13. Why Develop For Android?
The increasing popularity of modern smartphones, combined with the increasing availability
of high-speed mobile data and Wi-Fi hotspots, has created a huge opportunity for advanced
mobile applications. Smartphone applications have changed the way people use their
phones.
Android represents a clean break, a mobile framework based on the reality of modern mobile
devices designed by developers, for developers. With a simple, powerful, and open SDK, no
licensing fees, excellent documentation, and a thriving developer community, Android
represents an opportunity to create software that changes how and why people use their
mobile phones.
The barrier to entry for new Android developers is minimal:
No certification is required to become an Android developer.
Google Play provides free, up-front purchase, and in-app billing options for distribution
and monetization of your applications.
There is no approval process for application distribution.
Developers have total control over their brands.
14. What Comes in the Box
The Android SDK includes everything you need to start developing, testing and debugging
Android applications:
The Android APIs — The core of the SDK is the Android API libraries that provide
developer access to the Android stack.
Development tools — The SDK includes several development tools that let you compile
and debug your applications so that you can turn Android source code into executable
applications.
The Android Virtual Device Manager and emulator — The Android emulator is a fully
interactive mobile device emulator featuring several alternative skins. The emulator runs
within an Android Virtual Device (AVD) that simulates a device hardware configuration.
Using the emulator you can see how your applications will look and behave on a real
Android device.
Full documentation — The SDK includes extensive code-level reference information
detailing exactly what’s included in each package and class and how to use them.
Online support — Android has rapidly generated a vibrant developer community. The
Google Groups.
15. Types of Android Applications
Most of the applications you create in Android will fall into one of the following categories:
Foreground — An application that’s useful only when it’s in the foreground and is
effectively suspended when it’s not visible. Games are the most common examples.
Background — An application with limited interaction that, apart from when being
configured, spends most of its lifetime hidden. These applications are less common, but
good examples include call screening applications, SMS auto-responders and alarm clocks.
Intermittent — Most well-designed applications fall into this category. At one extreme are
applications that expect limited interactivity but do most of their work in the background.
A common example would be a media player. At the other extreme are applications that
are typically used as foreground applications but that do important work in the
background. Email and news applications are great examples.
Widgets and Live Wallpapers — Some applications are represented only as a home-screen
Widget or as a Live Wallpaper.
16. Developing for Android
The Android design philosophy demands that applications be designed for:
Performance
Responsiveness
Freshness
Security
Seamlessness
Accessibility
17. Android Development Tools
The Android SDK includes several tools and utilities to help you create, test and debug your
projects:
The Android Emulator: An implementation of the Android virtual machine designed to
run on your development computer. You can use the emulator to test and debug your
android applications.
Dalvik Debug Monitoring Service (DDMS): It uses the DDMS perspective to monitor and
control the Dalvik virtual machines on which you’re debugging your applications.
Android Asset Packaging Tool (AAPT): It constructs the distributable Android package
files (.apk).
Android Debug Bridge (ADB): It is a client-server application that provides a link to a
running emulator. It lets you copy files, install compiled application packages (.apk) and
run shell commands.
Logcat — A utility used to view and filter the output of the Android logging system.
18. Android To-Do List
To-Do List is a list of tasks you need to complete or things that you want to do.
It offer multiple ways to organize tasks, such as tags, lists, due dates, or projects.
It make it quick to add tasks.
It remind you about self-imposed deadlines.
It offer a clean Android interface, with native features like notifications and widgets.
It sync tasks to your other devices.
Examples:
Google Tasks guide
Google Calendar