A Developer’s Introduction to Google Android Dr. Frank McCown Harding University Fall 2011 This work is licensed under Creative Commons Attribution-NonCommercial.

Slides:



Advertisements
Similar presentations
Android Application Development A Tutorial Driven Course.
Advertisements

Google Android Introduction to Mobile Computing. Android is part of the build a better phone process Open Handset Alliance produces Android Comprises.
Android Overview and Android Development Environment
David Angulo Rubio ANDROID OS Open Software Platform for Mobile Devices.
A Developer’s Introduction to Google Android Dr. Frank McCown Harding University Spring 2010.
Dr. Frank McCown Computer Science Dept. Harding University Searcy, Arkansas, USA March 9, 2011 This work is licensed under a Creative Commons Attribution.
Android architecture overview
Chapter 1: Voilà! Meet the Android
Programming Mobile Applications with Android
Joemarie Comeros Amparo Android Development Orientation for Starters.
Android Overview. Why Mobile App Development? The fact that we can! Only a few years ago you had to be in the Motorola inner circle to do it! Mobile platform.
DEPARTMENT OF COMPUTER ENGINEERING
Android and Project Structure. Android Android OS – Built on Linux Kernel – Phones – Netbooks – Readers – Other???
Mobile Application Development
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Introduction to Android Platform Overview
© Strategic Mapping & Data Services LLC – Dr. Michael Stachiw – February 2012© Strategic Mapping & Data Services LLC Android Programming Dr. Michael A.
Android Application Development CSE 5520/4520 Wireless Networks.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
Android Programming Day best Android Apps Lzo&feature=fvwrel.
CS378 - Mobile Computing Anatomy of an Android App and the App Lifecycle.
Android Introduction Platform Overview.
Android and Eclipse Thaddeus Diamond CPSC 112. A Quick Introduction Eclipse is an IDE (Integrated Development Environment Open Source Much more full-featured.
Mobile Application Development with ANDROID Tejas Lagvankar UMBC 29 April 2009.
Mobile Application Development with ANDROID. Agenda Mobile Application Development (MAD) Intro to Android platform Platform architecture Application building.
About me Yichuan Wang Android Basics Credit goes to Google and UMBC.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Android Programming By Mohsen Biglari Android Programming, Part1: Introduction 1 Part1: Introduction By Mohsen Biglari.
Chapter 1: Voilà! Meet the Android
2- Android Overview and Android Development Environment CSNB544 Mobile Application Development Thanks to Utexas Austin.
Android Info mostly based on Pro Android 3.  User Applications  Java Libraries – most of Java standard edition ◦ Activities/Services ◦ UI/Graphics/View.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
01. Introduction to Android Prof. Oum Saokosal Master of Engineering in Information Systems, South Korea
Ali Shahrokni Application Components Activities Services Content providers Broadcast receivers.
Presentation Seminar on “IMAGE SLIDER –AN ANDROID APPLICATION”
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
1 Android- Platform Overview. 2 What is Android? Android is a software stack for mobile devices that includes an operating system, middleware and key.
Android for Java Developers Denver Java Users Group Jan 11, Mike
ANDROID 응용 프로그래밍 과정 – 목차 - 안드로이드란 - 안드로이드가 만들어지게 된배경 - 안드로이드의 철학 - 안드로이드 환경설정 ( SDK download, eclipse plug-in 설정, 간단한 프로그램 실행 ) - 안드로이드 동작원리 - 안드로이드 핵심.
Presented By: Muhammad Tariq Software Engineer Android Training course.
© by Pearson Education, Inc. All Rights Reserved. 1 Introduction to Android From “Android: How to Program” By Paul Deitel and Harvey Deitel.
Android Development Environment Environment/tools Windows Eclipse IDE for Java Developers (v3.5 Galileo) Java Platform (JDK 6 Update 18) Android.
Android Overview History and architecture. Brief History 1996 The WWW already had websites with color and images But, the best phones displayed a couple.
Android Overview Shashank Kailash Gajbhiye. Why Mobile App Development? The fact that we can! Only a few years ago you had to be in the Motorola inner.
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
1 Android Introduction Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
Mobile Application Development with ANDROID Umang Patel(6537) LDCE.
By, Rutika R. Channawar. Content Introduction Open Handset Alliance Minimum Hardware Requirements Versions Feature Architecture Advantages Disadvantages.
1 Android Workshop Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
Android Development For Beginners. What is Android? Android is an open mobile phone platform that was developed by Google and later by Open Handset Alliance.
By : Abhishek Verma Main Topics : 1. Introduction 2. Platform 3. Software Development 4. Overall Evaluation.
ANDROID OS Ravi Soni MTech (CS) III Sem. W HAT IS A NDROID ? Android is a software stack for mobile devices that includes an operating system, middleware.
Android. Android An Open Handset Alliance Project A software platform and operating system for mobile devices Based on the Linux kernel Developed by Google.
Introduction to Android Programming
COM594: Mobile Technology Practical – Week 1 Android and Android Studio.
Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran
Android Mobile Application Development
Android 01: Fundamentals
Android Runtime – Dalvik VM
Android.
Development-Introduction
Emulator.
CIS 470 Mobile App Development
CMPE419 Mobile Application Development
Android Overview and Android Development Environment
SE4S701 Mobile Application Development
Application Development A Tutorial Driven Course
CHAPTER 1 Introduction Chapter objectives: Understand what Android is
CMPE419 Mobile Application Development
Presentation transcript:

A Developer’s Introduction to Google Android Dr. Frank McCown Harding University Fall 2011 This work is licensed under Creative Commons Attribution-NonCommercial 3.0Attribution-NonCommercial 3.0

20androids%20dream%20of%20electric%20sheep.jpg

Brief History 2005 – Google acquires startup Android Inc. to start Android platform – Work on Dalvik VM begins 2007 – Open Handset Alliance announced – Early look at SDK 2008 – Google sponsors 1 st Android Developer Challenge – T-Mobile G1 announced – SDK 1.0 released – Android released open source (Apache License) – Android Dev Phone 1 released Pro Android by Hashimi & Komatineni (2009) 3

Brief History cont – SDK 1.5 (Cupcake) New soft keyboard with “autocomplete” feature – SDK 1.6 (Donut) Support Wide VGA – SDK 2.0/2.0.1/2.1 (Eclair) Revamped UI, browser 2010 – Nexus One released to the public – SDK 2.2 (Froyo) Flash support, tethering – SDK 2.3 (Gingerbread) UI update, system-wide copy-paste 4

Brief History cont – SDK 3.0 (Honeycomb) for tablets only New UI for tablets, support multi-core processors – SDK 3.1 and 3.2 Hardware support and UI improvements – SDK 4.0 (Ice Cream Sandwich) For Q4, combination of Gingerbread and Honeycomb 5

What is Google Android? A software stack for mobile devices that includes – An operating system – Middleware – Key Applications Uses Linux to provide core system services – Security – Memory management – Process management – Power management – Hardware drivers

Setup Development Environment Install JDK 5, 6, or 7 Install Eclipse IDE for Java EE Developers (version Indigo) Download and unpack the Android SDK Install Android Development Tools (ADT) plugin for Eclipse Detailed install instructions available on Android site

10

Android Emulator or AVD Emulator is essential to testing app but is not a substitute for a real device Emulators are called Android Virtual Devices (AVDs) Android SDK and AVD Manager allows you to create AVDs that target any Android API level AVD have configurable resolutions, RAM, SD cards, skins, and other hardware 11

Android Emulator: 1.6 Device 12

Android Emulator: 2.2 Device 13

Android Emulator: 3.0 Device 14

Emulator Basics Host computer’s keyboard works Host’s mouse works like finger Uses host’s Internet connection Side buttons work: Home, Menu, Back, Search, volume up and down, etc. Ctrl-F11 toggle landscape  portrait Alt-Enter toggle full-screen mode More info at

Emulator Limitations No support for placing or receiving actual phone calls – Simulate phone calls (placed and received) through the emulator console No support for USB connections No support for camera/video capture (input) No support for device-attached headphones No support for determining connected state No support for determining battery charge level and AC charging state No support for determining SD card insert/eject No support for Bluetooth No support for simulating the accelerometer – Use OpenIntents’s Sensor Simulator 16

In other words, test your app on an actual device! 17

Create an AVD using Android SDK and AVD Manager 18

Or From the Command Line 19 C:\android-sdk-windows\tools>android create avd -n MyDevice -t android-8 Android 2.2 is a basic Android platform. Do you wish to create a custom hardware profile [no] Created AVD 'MyDevice2' based on Android 2.2, with the following hardware config: hw.lcd.density=240 vm.heapSize=24 C:\android-sdk-windows\tools>emulator -avd MyDevice Device name Target platform More info: Launch device

Android Runtime: Dalvik VM Subset of Java developed by Google Optimized for mobile devices (better memory management, battery utilization, etc.) Dalvik runs.dex files that are compiled from.class files Introduces some new libraries Does not support some Java libraries like AWT

Applications Are Boxed By default, each app is run in its own Linux process – Process started when app’s code needs to be executed – Threads can be started to handle time-consuming operations Each process has its own Dalvik VM By default, each app is assigned unique Linux ID – Permissions are set so app’s files are only visible to that app

Producing an Android App Java codeByte code Dalvik exe Byte code.java.class Other.class files javac dx classes.dex AndroidManifest.xml Resources.apk aapt

Hello Android Tutorial

Important Files src/HelloAndroid.java – Activity which is started when app executes res/layout/main.xml – Defines & lays out widgets for the activity res/values/strings.xml – String constants used by app gen/R.java (Don’t touch!) – Auto-generated file with identifiers from main.xml, strings.xml, and elsewhere AndroidManifest.xml – Declares all the app’s components – Names libraries app needs to be linked against – Identifies permissions the app expects to be granted 24

src/HelloAndroid.java Activity which is started when app executes 25

res/layout/main.xml Declares layouts & widgets for the activity 26 Tree from:

Various Layouts 27

Various Widgets 28

res/values/strings.xml String constants used by app Used for supporting Localization – res/values-es/values/strings.xml to support Spanish – res/values-fr/values/strings.xml to support French – Etc. 29

gen/R.java Auto-generated file with identifiers from main.xml, strings.xml, and elsewhere 30 Do not modify!

AndroidManifest.xml Declares all the app’s components Names libraries app needs to be linked against Identifies permissions the app expects to be granted 31

Four Application Components 1.Activities – Presents a visual UI for a single endeavor – Single app may be composed of several activities – Examples: list of photos, buttons to start/stop a song 2.Services – Performs background work (no UI) – Examples: play background music, retrieve data over a network 3.Broadcast Receivers – Receives and reacts to broadcast announcements (no UI) – Broadcast examples: battery is low, pic is taken, lang pref changed 4.Content Providers – Provides app data to other applications (no UI) – Examples: share contact info from SQLite, image from the file system 32

SDK Samples

Activity Lifecycle

References Android Introduction by Marko Gargenta, oid-software-platform/ oid-software-platform/ Android Dev Guide ndamentals.html ndamentals.html Pro Android by Hashimi & Komatineni (2009)