Android Programming: Introduction & Overview. CS 3: Computer Programming in Java

Similar documents
CS378 -Mobile Computing. Android Overview and Android Development Environment

Introduction to Android

01. Introduction of Android

Mobile Phones Operating Systems

Praktikum Entwicklung Mediensysteme (für Master)

Development. SriSeshaa Technologies. Table of Contents

CS 528 Mobile and Ubiquitous Computing Lecture 2: Android Introduction and Setup. Emmanuel Agu

Android Architecture. Alexandra Harrison & Jake Saxton

Android 5.0: Lollipop OS

Workshop on Android and Applications Development

Introduction to Android

Introduction to Android: Hello, Android! 26 Mar 2010 CMPT166 Dr. Sean Ho Trinity Western University

How To Develop An Android App On An Android Device

OMX, Android, GStreamer How do I decide what to use? 15 July 2011

Programming with Android

Android Programming and Security

An Introduction to Android

Basics. Bruce Crawford Global Solutions Manager

Smartphone market share

Reminders. Lab opens from today. Many students want to use the extra I/O pins on

Università Degli Studi di Parma. Distributed Systems Group. Android Development. Lecture 1 Android SDK & Development Environment. Marco Picone

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

DEVELOPING MOBILE APPLICATIONS USING ANDROID

Graduate presentation for CSCI By Janakiram Vantipalli ( Janakiram.vantipalli@colorado.edu )

Mobile Application Development 2014

Android Basics. Xin Yang

directory to "d:\myproject\android". Hereafter, I shall denote the android installed directory as

ANDROID. Programming basics

The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.

Running a Program on an AVD

Android Development. Lecture AD 0 Android SDK & Development Environment. Università degli Studi di Parma. Mobile Application Development

Android Operating System

Getting started with Android and App Engine

What else can you do with Android? Inside Android. Chris Simmonds. Embedded Linux Conference Europe Copyright 2010, 2net Limited.

Google Android: An Emerging Innovative Software Platform For Mobile Devices

Android Development. Marc Mc Loughlin

Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department. Mobile Computing ECOM Eng. Wafaa Audah.

Lecture 1 Introduction to Android

What is Android? originally purchased from Android, Inc. in 2005

Programmazione di sistemi mobili e tablet

Fahim Uddin 1. Java SDK

l What is Android? l Getting Started l The Emulator l Hello World l ADB l Text to Speech l Other APIs (camera, bitmap, etc)

Creating and Using Databases for Android Applications

ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android

Introduction to Android Development. Jeff Avery CS349, Mar 2013

Технологии Java. Android: Введение. Кузнецов Андрей Николаевич. Санкт-Петербургский Государственный Политехнический Университет

Specialized Android APP Development Program with Java (SAADPJ) Duration 2 months

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

Example Connection between USB Host and Android

Android Geek Night. Application framework

Programming with Android: System Architecture. Dipartimento di Scienze dell Informazione Università di Bologna

ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android

Mobile App Development

ANDROID OPERATING SYSTEM

Building an Android client. Rohit Nayak Talentica Software

Android Operating System:

Introduction to Android Programming (CS5248 Fall 2015)

Introduction to Android

An Introduction to Android. Huang Xuguang Database Lab. Inha University

Getting Started with Android Development

Hacking your Droid ADITYA GUPTA

Running Android Applications on BlackBerry 10 developer.blackberry.com/android

How To Develop Android On Your Computer Or Tablet Or Phone

GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS

Overview. The Android operating system is like a cake consisting of various layers.

Mobile Applications Grzegorz Budzyń Lecture. 2: Android Applications

App Development for Smart Devices. Lec #2: Android Tools, Building Applications, and Activities

International Journal of Research in Advent Technology Available Online at:

OpenCV on Android Platforms

Issues in Android on Mobile Platform and Their Resolution

Development Of Mobile Applications GDF Mobilinfo

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

Overview of CS 282 & Android

Developing Android Applications Introduction to Software Engineering Fall Updated 7 October 2015

Getting Started with Android Programming (5 days) with Android 4.3 Jelly Bean

CS297 Report. Accelerometer based motion gestures for Mobile Devices

Introduction to Android. Sean Sullivan October 27, 2008

Mobile Application Development Android

Introduction to Android Development. Ed Burnette

TUTORIALS AND QUIZ ANDROID APPLICATION SANDEEP REDDY PAKKER. B. Tech in Aurora's Engineering College, 2013 A REPORT

Choosing a Mobile Application Development Approach

Programming with Android

Developing Mobile Applications

ITG Software Engineering

COURSE CONTENT. GETTING STARTED Select Android Version Create RUN Configuration Create Your First Android Activity List of basic sample programs

Here to take you beyond Mobile Application development using Android Course details

ANDROID PROGRAMMING - INTRODUCTION. Roberto Beraldi

Tutorial on Basic Android Setup

Priority Based Pre-emptive Task Scheduling for Android Operating System

ANDROID INTRODUCTION TO ANDROID

Android Mobile App Building Tutorial

Developer's Cookbook. Building Applications with. The Android. the Android SDK. A Addison-Wesley. James Steele Nelson To

Programming with Android: SDK install and initial setup. Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna

Example of Standard API

Intel Integrated Native Developer Experience (INDE): IDE Integration for Android*

Module Title: Software Development A: Mobile Application Development

Homework 9 Android App for Weather Forecast

A B S T R A C T. Keywords: Mobile computing, Compiler, Android Development tool kit; I. INTRODUCTION

Developing Applications for ios

1. Introduction to Android

Transcription:

Android Programming: Introduction & Overview CS 3: Computer Programming in Java

Objectives What is Android? Layout its architectures Feature some of those features A little history Talk about devices, apps, and the fight for market share vs. Apple Discuss the development environment, including the Android SDK and emulator Producing an Android application

What Is Android Programming? 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

Android Architecture

Features of Android Application framework enabling reuse and replacement of components Dalvik virtual machine optimized for mobile devices Integrated browser based on the open source WebKit engine Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional) SQLite for structured data storage

Features of Android (2) Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) GSM Telephony (hardware dependent) Bluetooth, EDGE, 3G, and WiFi (hardware dependent) Camera, GPS, compass, and accelerometer (hardware dependent) Rich development environment including a device emulator, tools for debugging, memory and performance profiling, a plugin for the Eclipse IDE, and Android Studio

A Brief History of Android 2001 2003 2005 Palm Kyocera 6035, combing PDA and phone Blackberry smartphone released Google acquires startup Android Inc. to start Android platform. Work on Dalvik VM begins

A Brief History of Android (2) 2007 2008 Open Handset Alliance announced Early look at SDK June, iphone released Google sponsors 1st Android Developer Challenge T-Mobile G1 announced, released fall SDK 1.0 released Android released open source (Apache License) Android Dev Phone 1 released

A Brief History of Android (3) 2009 2010 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 Nexus One released to the public SDK 2.2 (Froyo) Flash support, tethering SDK 2.3 (Gingerbread) UI update, system-wide copy-paste

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

A Brief History of Android (5) 2012 2013 2015 Android 4.1, "Jelly Bean" released in July 24 th Android 4.4, KitKat released October 31 st Android 5.1, Lollipop released March 9 th Android 6.0, Marshmallow released October 5 th

Top Smartphone Platforms Top Smartphone Platforms 3 Month Avg. Ending Dec. 2015 vs. 3 Month Avg. Ending Sep. 2015 Total U.S. Smartphone Subscribers Age 13+ Source: comscore MobiLens Share (%) of Smartphone Subscribers Sep-15 Dec-15 Point Change Total Smartphone Subscribers 100.0% 100.0% N/A Android 52.3% 53.3% 1.0 Apple 43.6% 42.9% -0.7 Microsoft 2.9% 2.9% 0.0 BlackBerry 1.2% 0.9% -0.3

About Android Devices and Device Distribution Based on active devices Forward compatible Not necessarily backward compatible Based on device visits to Google Play

Device Distribution February 2015

Device Distribution August 2015

Device Distribution November 2015

Device Distribution April 2016

Android Devices Estimated 1 billion+ as of Sept. 2013 activated devices 2012-400M, 2011-100M Estimated 1.5M new activations per day 2012-1M 2014 expected to ship 1 billion devices this year

Android Applications Google Play (formerly Android Market) > 1,000,000 apps 600,000 apps, June 2012 2/3 free, 1/3 paid Apple App Store, >825,000 apps April 2013 Apple and Google each claim 50,000,000,000 downloads What's old is new - Mac vs. PC iphone vs. Android???

Yes, iphone vs. Android

Developer Revenue BUSINESS STRATEGY: attract developers with comparison of revenue generated by applications, average revenue per user, etc.

Apple Still Dominates the Current Revenue, But

the Forecast Is Trending Towards Android Part of the reason is the sheer # of Android devices available in the world

Setup Development Environment Install JDK 7 Either install: Android Studio 2.0 or Eclipse Mars 4.5.2 (current Eclipse standard) Also need to install Android Development Tools (ADT) plugin for Eclipse Download and unpack the Android SDK Detailed install instructions available on Android site

Android SDK Manager

Android AVD Manager

About the Android AVD Manager or Emulator 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

Android Emulator 1.6

Android Emulator 2.2

Android Emulator 3.0

Android Emulator 4.0

Emulator Basics Host computer s keyboard works Host s mouse acts as finger Uses host s Internet connection Other 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 http://developer.android.com/guide/developing/devices/emulator.html

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

Emulator Limitations (2) 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 That why we need development phones and tablets!

Creating An AVD Using AVD Manager Can also use the command line: http://developer.android.com/guide/developing/devices/managing-avds-cmdline.html

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 new libraries Does not support some Java libraries like AWT, Swing http://developer.android.com/reference/packages.html

Running Android From the Command Line 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 MyDevice is the device name; android-8 is the target platform C:\android-sdk-windows\tools>emulator -avd MyDevice This will launch the actual device

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 Visual Java code javac Byte code.class dx Dalvik exe classes.dex aapt Byte code Other.class files <xml> AndroidManifest.xml <str > Resources

Android Manifest Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory The manifest presents essential information about the application to the Android system, information the system must have before it can run any of the application's code Among other things, the manifest does the following: It names the Java package for the application The package name serves as a unique identifier for the application It describes the components of the application the activities, services, broadcast receivers, and content providers that the application is composed of Names the classes that implement each of the components and publishes their capabilities (for example, which Intent messages they can handle) These declarations let the Android system know what the components are and under what conditions they can be launched

What the Android Manifest Does It names the Java package for the application The package name serves as a unique identifier for the application It describes the components of the application the activities, services, broadcast receivers, and content providers that the application is composed of Names the classes that implement each of the components and publishes their capabilities (for example, which Intent messages they can handle) These declarations let the Android system know what the components are and under what conditions they can be launched It determines which processes will host application components

What the Android Manifest Does (2) It declares which permissions the application must have in order to access protected parts of the API and interact with other applications It also declares the permissions that others are required to have in order to interact with the application's components It lists the Instrumentation classes that provide profiling and other information as the application is running These declarations are present in the manifest only while the application is being developed and tested; they're removed before the application is published It declares the minimum level of the Android API that the application requires It lists the libraries that the application must be linked against

Other Android Developer Tools Android Debug Bridge Part of SDK Command line tool to communicate with an emulator or connected Android device Check devices attached / running Install apk's, Android Package files, "executables", can find samples on places besides Google Play And more!

Dalvik Debug Monitor Server (DDMS) Debugging tool Provides screen capture on the device, thread and heap information on the device, logcat, process, and radio state information, incoming call and SMS spoofing, location data spoofing, and more Can interact with DDMS via Eclipse plugin, another view in Eclipse

Visual of DDMS

Summary What is Android? Laid out its architectures Featured some of those features Gave a little history Talked about devices, apps, and the fight for market share vs. Apple Discussed the development environment, including the Android SDK and emulator Showed how to produce an Android application