Programming the Android Platform. Logistics

Similar documents
Overview of CS 282 & Android

The Android Platform

Lecture 1 Introduction to Android

Android Architecture. Alexandra Harrison & Jake Saxton

Synthesis for Developing Apps on Mobile Platforms

An Introduction to Android Application Development. Serdar Akın, Haluk Tüfekçi

Mobile Devices - An Introduction to the Android Operating Environment. Design, Architecture, and Performance Implications

ANDROID OPERATING SYSTEM

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

An Introduction to Android

Introduction to Android

Performance Analysis of Android Platform

Creating and Using Databases for Android Applications

Android Operating System:

Mobile Devices - An Introduction to the Android Operating Environment. Design, Architecture, and Performance Implications

Deep Inside Android. OpenExpo Zurich September 25 th, Gilles Printemps - Senior Architect. Copyright 2007 Esmertec AG.

Introduction to Android

ANDROID BASED MOBILE APPLICATION DEVELOPMENT and its SECURITY

Android Application Development. Daniel Switkin Senior Software Engineer, Google Inc.

A Short Introduction to Android

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

Android Basics. Xin Yang

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

ANDROID PROGRAMMING - INTRODUCTION. Roberto Beraldi

INTRODUCTION TO ANDROID CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 11 02/15/2011

Example of Standard API

ITG Software Engineering

ANDROID PROGRAMMING - INTRODUCTION. Roberto Beraldi

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

A Look through the Android Stack

Mobile Phones Operating Systems

Introduction to Android Android Architecture Software Development Purpose of the project Location Based Service (LBS) Android. Location class Google

ANDROID INTRODUCTION TO ANDROID

Android Programming and Security

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

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

Research and Design of Universal and Open Software Development Platform for Digital Home

Android Operating System

A Survey on Android vs. Linux

ODROID Multithreading in Android

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

ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android

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

Lecture 17: Mobile Computing Platforms: Android. Mythili Vutukuru CS 653 Spring 2014 March 24, Monday

Development. SriSeshaa Technologies. Table of Contents

Review On Google Android a Mobile Platform

Application of Android OS as Real-time Control Platform**

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

Praktikum Entwicklung Mediensysteme (für Master)

Android 5.0: Lollipop OS

Introduction to Android Development. Ed Burnette

Workshop on Android and Applications Development

Building an Android client. Rohit Nayak Talentica Software

Hacking your Droid ADITYA GUPTA

Mobile Application Development Android

Android on i.mx Applications Processors

Mobile Application Development 2014

Android Architecture For Beginners

A Review OnEmployee Monitoring Application Using Android Smartphone s Neha S. Mankar 1, Sweeti M. Shambharkar 2 and Asst. Prof. Priti P.

Android Development: Part One

ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android

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

Introduction to Android Development. Jeff Avery CS349, Mar 2013

Software development. Development requirements. Java. Android SDK. Eclipse IDE (optional)

Android (Basic + Advance) Application Development

Android Application for Vehicle Theft Prevention and Tracking System

Android Geek Night. Application framework

Analysis of advanced issues in mobile security in android operating system

Smartphone market share

GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS

CS378 -Mobile Computing. Android Overview and Android Development Environment

Issues in Android on Mobile Platform and Their Resolution

- Applet java appaiono di frequente nelle pagine web - Come funziona l'interprete contenuto in ogni browser di un certo livello? - Per approfondire

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

RoverPal - A Mobile Payment Application

Mobile Operating Systems. Week I

Android Architecture Diagram:

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

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

Android Developer Fundamental 1

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

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

Programming with Android

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

Module Title: Software Development A: Mobile Application Development

Introduction. Application Security. Reasons For Reverse Engineering. This lecture. Java Byte Code

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

Remote Desktop on Mobile

International Engineering Journal For Research & Development

ANDROID. Programming basics

Getting Started with Tizen SDK : How to develop a Web app. Hong Gyungpyo 洪 競 杓 Samsung Electronics Co., Ltd

MMI 2: Mobile Human- Computer Interaction Android

Android Application Development

Virtualization: Hypervisors for Embedded and Safe Systems. Hanspeter Vogel Triadem Solutions AG

Interpreters and virtual machines. Interpreters. Interpreters. Why interpreters? Tree-based interpreters. Text-based interpreters

Transcription:

Programming the Android Platform CMSC498G Logistics Professor Adam Porter 4125 AVW aporter@cs.umd.edu Course meets W 3:00 3:50 in CSI 3118 1

Goals Learn more about Mobile devices Mobile device programming concepts The Android platform Develop a complete 1-semester, undergraduate level course Materials will be made open source (e.g., via Creative Commons License) List of topics Lecture materials Assignments Miscellaneous notes & links Develop interesting Android applications Each student will do a semester project Ground Rules This course will be largely student run Professor will lecture for first 3 weeks Students will be responsible for remaining lectures Each student will prepare 1 lecture A lecture includes: 45-minute presentation (with slides) Laboratory exercise with Junit test cases & solutions To be done by students outside of class Should require 1-2 hours of programming effort List of supplementary materials, if appropriate Submit lecture 2 weeks before presentation date Presenter MUST be on time to lecture 2

Grading Student lectures (1/3) Final exam (1/3) Individual project (1/3) The Android Platform A software stack for mobile devices. It includes: Operating system Middleware Key applications Developers use the Android SDK to create Android applications that run on the Android Platform The SDK includes: Libraries Development tools Lots of documentation at http://developer.android.com/ Start browsing today! 3

The Android Architecture http://developer.android.com/guide/basics/what-is-android.html Linux Kernel Defines an abstraction layer between HW & SW Provides services such as: Security Memory & process management Network stack Device driver model 4

Linux Kernel (cont.) Some Android-specific components Binder IPC Android shared memory (ashmem) Power management wake locks Alarm driver (timers) Low memory killer Kernel debugger Logger Native Libraries C/C++ libraries accessed through the Android application framework Some examples: System C library bionic libc Surface Manager Display mgmt Media Framework Audio/video Webkit- Web browser engine OpenGL ES, SGL - Graphics engines FreeType - Font rendering SQLite - Relational DB engine SSL Secure sockets layer 5

Android Runtime Basic support services for executing android applications Comprised of Core Libraries Dalvik Virtual Machine Core Libraries Core Java classes providing basic services used by most applications java.* javax.* junit.* org.apache.* org.json.* org.xml.* android.*, Does not include some classes from the standard Java SDK Docs at: http://developer.android.com/reference/packages.html 6

Dalvik Virtual Machine Android applications typically written in Java, But do not run in a Java VM The dx program transforms java classes into.dex-formatted bytecodes Bytecodes then executed by the Dalvik Virtual Machine Each android application (or part) runs in its own process, inside its own instance of the the Dalvik VM Dalvik Virtual Machine (cont.) The Dalvik VM is designed to run on a handset Slow CPU Little RAM (64Mb total, maybe only 10Mb available at runtime) No swap space Limited battery life Some design choices 1.dex file for multiple classes Modified garbage collection to improve memory sharing Optimizations at installation time register-based, rather than stack-based 7

Dalvik Virtual Machine (cont.) Some design choices Memory.dex file has 1 common constant pools for multiple classes Modified garbage collection to improve memory sharing CPU Optimizations at installation time register-based, rather than stack-based Using Registers Expected benefits over stack-based VMs Avoids (slow) instruction dispatch Avoids unnecessary memory accesses More efficient instruction stream 8

Dalvik Virtual Machine (cont.) public static long sumarray(int[] arr) { long sum = 0; for (int i : arr) {sum += i; } return sum; } 0: lconst_0 1: lstore_1 2: aload_0 3: astore_3 4: aload_3 5: arraylength 6: istore 4 8: iconst_0 9: istore 5 11: iload 5 13: iload 4 15: if_icmpge 36 18: aload_3 19: iload 5 21: iaload 22: istore 6 24: lload_1 25: iload 6 27: i2l 28: ladd 29: lstore_1 30: iinc 5, 1 33: goto 11 36: lload_1 37: lreturn Java Bytecode 9

Dex Bytecode 0000: const-wide/16 v0, #long 0 // #0000 0002: array-length v2, v8 0003: const/4 v3, #int 0 // #0 0004: move v7, v3 0005: move-wide v3, v0 0006: move v0, v7 0007: if-ge v0, v2, 0010 // +0009 0009: aget v1, v8, v0 000b: int-to-long v5, v1 000c: add-long/2addr v3, v5 000d: add-int/lit8 v0, v0, #int 1 // #01 000f: goto 0007 // -0008 0010: return-wide v3 Tradeoffs Dan Bornstein of Google reported that register-based VMs used: (+) 30% fewer instructions (+) 35% fewer code units (1-byte vs. 2-byte instructions) (?) 35% more bytes in the instruction stream but can consume instructions two bytes at a time 10

Application Framework Window Manager Manages top-level window s look & behavior View system UI elements such as: lists, grids, text boxes, buttons, etc. Content Providers Allows accessing & publishing data Activity Manager Application lifecycle and common navigation stack Application Framework (cont.) Package manager Info about application packages Telephony manager Info about state of telephony services Resource Manager Access to non-code resources: e.g., strings, graphics, and layout files Location manager Access to system location services Notification Manager Sisplay custom alerts in the status bar 11

Applications Standard apps include: Home main screen Contacts contacts database Phone dial phone numbers Browser uses WebKit Email reader Gmail & others Your App Any application can be replaced 12