This document provides an introduction and overview for a course on mobile application development using Android. The course will cover topics like the Android UI, activities, intents, views, fragments, data storage, networking, sensors, graphics, and publishing apps on Google Play. It lists recommended textbooks and the prerequisites of having the Android SDK, Java, and an Android device or emulator. It also gives background on Android including its open source nature, architecture, history and versions.
2. Text Books
1.Professional Android Application development, Reto Meier, Wrox Programmer to
Programmer, 2015
2.Android Programming: The big nerd ranch Guide, Conway, J. hillegass, A., & Keur, C.,
5th edition
3.iOS Programming: The big nerd ranch Guide, Phillips, B. & Hardy, B., 2nd Edition,
2014
4. Course Outline
Introduction to Android
Android UI
Activities and Intents
Dynamic Views
Fragments
User Navigation
Data Storage
Networking
Sensors
Graphics and Multimedia
Google Play and App Development
5. Prerequisites
Android SDK
Java Runtime Environment
Preferred Android IDE
Android Device or Emulator
Basic knowledge of programming concepts and implementations
6. Android Ecosystem and Versions
Over 18k distinct Android devices
Screen resolutions varying from approximately 120 dpi or dots per inch to ~ 640 dpi
Over 80% of Android devices are running Android Jelly Bean version (4.1.x) or above
Over 40% of devices are Samsung devices (of devices surveyed)
Data gathered from Android developer dashboard, OpenSignal Aug 2014 report
8. What is a Mobile App ?
“Software applications that run on mobile devices, principally smartphones and tablet computers “
9. What is Mobile App Market ?
It is a portal or a repository from where applications can be downloaded and installed on mobile devices.
Android Market tops 4 million apps while Apple App Store has reached 25 billion downloads count !
11. Android is based on:
Linux 2.6 Kernel, providing
Memory management
Security
Process management
Network stack
Driver model
Abstraction layer
12. Open Handset Alliance (OHA)
Mobile Operators Handset Manufacturers
Semiconductor Companies Software Companies Commercialization Companies
13. First Android Mobile
The first commercially available phone running Android was the HTC Dream (also known as the T-
Mobile G1).
14. What is Android?
• Android delivers a complete set of software for mobile
devices
Operating System
Middleware
Key mobile applications
:Open
• Breaking down Application Boundaries
• Fast & Easy Application Development
15. History of Android
2001 search service for wireless device
2005
Acquire Android(Andy Rubin: Danger CEO, Development Sidekick of T-Mobile)
Acquire Skia(2D Graphics for mobile device)
Acquire RegWireless(Browser and Email for mobile device)
Move Engineers from PlamSource(Dianne Hackborn, etc…)
2007 Nov 5: Android announced
2007 Nov 12: Android SDK released by OHA
2007 Dec 14: Bug-fix SDK released
2008 Jan 3: Android Developer Challenge I starts accepting submissions
2008 Feb 13: m5-rc15 SDK released
2008 Apr 14: 1788 total submissions for Challenge I
2008 May 12: Top 50 Applications in Challenge I announced
2008 Nov: Android Phone(G1 Phone by HTC/T-mobile)
2008 Nov: Full Source Open
2009 Apr: HTC Magic
2009 July: HTC Hero, Samsung i7500, Android Netbook, Set-top……
2009 Aug: Android Developer Challenge II
16. Android Versions
Android 1.0 : Where it all began with launch of G1 on 22nd
October, 2008
Android 1.5 “Cupcake” : We saw the first touchscreen-only phone on the market
Android 1.6 “Donut” : Android was capable of running on a variety of screen resolutions and aspect ratios
Android 2.0/2.1 “Eclair” : Droid was by far the most powerful Android handset the world had seen at that point
& introduced improved Navigation on Google Map
Android 2.2 “Froyo” : Home screen improved
Android 2.3 “Gingerbread” : Improved Keyboard, Support for multiple cameras and granular control over copy
and paste
Android 3.0 “Honeycomb” : Targeted Tablets, death of physical buttons and new paradigm for app layout.
Android 4.0 “Ice Cream Sandwich” : Android Beam, Face unlock.
Android 4.1 “Jelly Bean” : Platform Development Kit
Android KitKat 4.4 - 4.4.4
Android Lollipop 5.0 – 5.1.1
Android Marshmallow 6.0 – 6.0.1
Android Nougat 7.0- 7.1.2
Android Oreo 8.0 – 8.1
Android Pie 9.0
Android 10
17. Open Source
Users
Industry Developer
Users
• Users have control of
their experience
• They control what gets
installed
• They choose the defaults
Industry
• Software stack open-
sourced under Apache
2.0 license
• Source available after
first handsets ship
• Anyone will be able to
build a system image
Developer
• Don not need
permission to ship an
application
• No hidden or privileged
framework APIs
• Can integrate, extend
and replace existing
components
20. Linux Kernel
• Android OS is built on top of the Linux 2.6 Kernel
– Linux Core functionality
• Memory management
• Process management
• Networking
• Security settings
– Hardware drivers
l
21. Libraries
• Android’s native libraries.
– Libc: c standard lib.
– SSL: Secure Socket Layer
– SGL: 2D image engine
– OpenGL|ES: 3D image engine
– Media Framework: media codecs
– SQLite: Database engine
– WebKit: Kernel of web browser
– FreeType: Bitmap and Vector
– SufraceManager: Compose window manager with
off-screen buffering.
22. Android Runtime
• Core Libraries
– Provides the functionality of the JAVA
Programming Language
• Dalvik VM
– A type of Java Virtual Machine
– Register based (not stack machine like JVM)
– Optimization for low memory requirements
– Executes .dex (Dalvik-Executable) files instead
of .class
– DX tool converts classes to .dex format
Each Android application:
• runs on its own Process
• runs on its own Instance of Dalvik VM
• is assigned its own Linux user ID
23. Application Framework
• The blocks that our applications directly interact with.
• Important blocks:
– Activity Manager: Manages the activity life cycle of applications
– Content Providers: Manage the data sharing between applications
– Telephony Manager: Manages all voice calls. We use telephony
manager if we want to access voice calls in our application.
– Location Manager: Location management, using GPS or cell tower
– Resource Manager: Manage the various types of resources we use in
our Application
24. Applications
This is where our applications are placed.
Some pre-installed applications:
– SMS client app
– Dialer
– Web browser
– Contact manager
• As developers, we are able to write an app which replaces
any existing system app.
• No compulsory applications
• Equality among apps
• Easily embedded web browser
• Parallel running
25. App Development in Android
Design applications for a variety of devices
Build anything from 3D games to social networks
Use a diverse set of information in your apps including location, movement, touch interactions, images, sounds,
and much more
Release an preview version of your application to a select group of users
Deploy your applications to the Google play store and make it available to millions of users
Collect actual user data to upgrade and add new features to your application
26. Android SDK
SDK – Software Development Kit Provides tools to create, develop, debug, analyze and enhance Android
applications including:
. Android emulators – to test your software on a simulation of a wide range of configurations, screen sizes, and
resolutions.
Debugging tools – to help you find the issues in your applications and fix them as quickly as possible.
Analyzing and Optimizing tools – so that once you build your application you can optimize it to reach its full
potential in speed and performance.
Code Samples: There is also lots of documentation and actual Android source code available in the Android
SDK so you can learn from the actual developers of Android about naming conventions and code syntax.
27. Android Studio
Based on JetBrains IntelliJ IDEA software
Designed specifically for Android development
Currently offers features including
WYSIWYG Editor with real-time app rendering
Gradle-based build support
Lint tools to catch performance, usability, version compatibility and other problems
Template-based wizards to create common Android designs and components
ProGuard and app-signing capabilities
Now the official Android IDE (integrated development environment)
28. Android Studio Keyboard Shortcuts
CTRL+SHIFT+A – Command look-up
ALT+ENTER – Quick fix
CTRL+ALT+L – Reformat code
CTRL+Q – Show documents
CTRL+P – Show method params
ALT+Insert – Generate method
F4 – Jump to source
CTRL+Y – Delete line
CTRL+ALT+SHIFT+N – Search symbol
CTRL+F9 – Build
SHIFT+F10 – Build and run
ALT+1 – Toggle project visibility
ALT+left-arrow or ALT+right-arrow – Navigate open tabs
ALT+F8 – Evaluate Expression
CTRL+mouse-click – Drill Down
29. Install Android Studio
System Requirements
Microsoft® Windows® 8/7/Vista/2003 (32 or 64-bit) or Mac® OS X® 10.8.5 or higher, up to 10.9 (Mavericks) or
GNOME or KDE desktop
2 GB RAM minimum, 4 GB RAM recommended
400 MB hard disk space + at least 1 G for Android SDK, emulator system images, and caches
1280 x 800 minimum screen resolution
Java Development Kit (JDK) 7
Android Studio can be downloaded from http://developer.android.com/sdk/index.html
30. Course Outline
Introduction to Android
Android UI
Activities and Intents
Dynamic Views
Fragments
User Navigation
Data Storage
Networking
Sensors
Graphics and Multimedia
Google Play and App Development
Notas del editor
In order to fully participate in the material in this course, some requirements are necessary. These include downloading and installing a recent version of the Android SDK or software development kit. Installing a Java Runtime Environment. Installing and configuring an IDE for Android development (preferably either eclipse with the adt plugin or Android studio). In this video series we will mainly be using the Android Studio IDE. An Android device or Android emulator or simulator to run the example code and lab exercises for this video series. And also a basic knowledge of programing concepts and implementations.
Currently Android runs on over eighteen thousand different devices throughout the world. These devices can be anything from your garden variety smartphone in your pocket, to smart refrigerators or microwaves running Android in your kitchen, and soon to be running on the very cars that take us to work.
With this wide variety, the screen resolutions for devices can range from the lower end of about 120 dpi which stands for dots per inch on a screen, to 640 dpi. The DPI value denotes the “quantity of pixels within a physical area of the screen.” The higher the DPI the higher the resolution and sharper an image that screen can generate.
Over 80% of Android devices are running the Jelly Bean version of Android or above. We will get more into the different versions of Android later on in this lesson.
Also a whopping 40% of devices running Android right now are from the Samsung corporation.
The Open Handset Alliance is a consortium of 84 firms to develop open standards for mobile devices. Member firms include HTC, Sony, Dell, Intel, Motorola, Qualcomm, Texas Instruments, Google, Samsung Electronics, LG Electronics, T-Mobile, Sprint Corporation, Nvidia, and Wind River Systems
Founded by Google, November 5, 2007.
Android uses the Linux kernel under the hood. Because Linux is open-source, Google's Android developers could modify the Linux kernel to fit their needs. Linux gives the Android developers a pre-built, already maintained operating system kernel to start with so they don't have to write their own kernel
The kernel is a computer program that is the core of a computer's operating system, with complete control over everything in the system.[1] On most systems, it is one of the first programs loaded on start-up
Middleware is computer software that provides services to software applications beyond those available from the operating system. It can be described as "software glue"
Android Studio is an IDE based off of JetBrains IntelliJ IDEA software. Android studio was announced in May of 2013 at the Google I/O conference. It was available as an early access preview at that time. Android studio entered the beta stage in June 2014 and in December 2014 was released as a stable build starting from version 1.0.
Android Studio is specifically designed for Android development and it has been made available for use on Windows, Max OS X and Linux. With Android Studio Google aimed to develop an IDE with the “needs of Android developers in mind.” The development of the IDE is also open source allowing for everyone to view the source code and even apply to contribute to the IDE.
Android Studio offers a wide array of new and improved features for Android Development. This includes an improved WSYWYG editor for building UI for your applications. This specialized editor has been built to optimize development for multiple screen sizes, resolutions, ,and proportions, allowing us to design UI for everything from smartphones and tablets to apps running on smart watches and cars.
With Android Studio we are introduced to the Gradle based build system which features components allowing us to customize, configure, and extend the build process, create multiple APKs for your app with different features using the same project and modules, and reuse code and resources across source sets.
In Android Studio we also have an improved inspection tool which is called Lint. Lint has improved features including checks for fragment injection, gradle plugin version and sdk compatibility, where property assignments no longer work as expected, and much more.
When starting a project in Android Studio there is a selection of preconfigured templates that can be used for a quick jump start into a project. These templates come with pre-constructed components like login screens and settings screen. Using the built in templates can allow for quick development using a solid well constructed base.
Once we have finished developing our application, Android studio will give us the tools we need to build and sign that application for later distribution via the Google play store. Android Studio also includes the ability to use the ProGuard tool which “shrinks, optimizes, and obfuscates your code by removing unused code and renaming classes, fields, and methods with semantically obscure names. “ This creates a smaller apk and makes it harder for others to reverse engineer your application.
With the release of Android Studio 1.0, Android Studio is now the official IDE or Integrated development environment for developing applications, libraries, and components for the android operating system.