Computer Science E-76 Building Mobile Applications

Similar documents
COMP4521 EMBEDDED SYSTEMS SOFTWARE

Embedded Systems Programming - PA8001

Real-Time Embedded Systems

Android Basics. - Bhaumik Shukla Android Application STEALTH FLASH

App Development for Android. Prabhaker Matet

Getting started: Installing IDE and SDK. Marco Ronchetti Università degli Studi di Trento

UNDERSTANDING ACTIVITIES

Lab 1: Getting Started With Android Programming

Security model. Marco Ronchetti Università degli Studi di Trento

Applications. Marco Ronchetti Università degli Studi di Trento

Mobile Programming Lecture 5. Composite Views, Activities, Intents and Filters

8/30/15 MOBILE COMPUTING. CSE 40814/60814 Fall How many of you. have implemented a command-line user interface?

EMBEDDED SYSTEMS PROGRAMMING Application Basics

Vienos veiklos būsena. Theory

Android Application Development

Mobile Programming Lecture 1. Getting Started

Getting Started. Dr. Miguel A. Labrador Department of Computer Science & Engineering

Android Development Tutorial. Yi Huang

Introduction To Android

Lifecycle Callbacks and Intents

Diving into Android. By Jeroen Tietema. Jeroen Tietema,

Android App Development

CS378 -Mobile Computing. Anatomy of and Android App and the App Lifecycle

CS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu

LECTURE NOTES OF APPLICATION ACTIVITIES

Mobila applikationer och trådlösa nät, HI1033, HT2013

Programming with Android: Introduction. Layouts. Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna

Mobile User Interfaces

TPCT s College of Engineering, Osmanabad. Laboratory Manual SDL-II. Mobile Application Development (Android) For. Third Year Students (CSE)

Java & Android. Java Fundamentals. Madis Pink 2016 Tartu

CMSC436: Fall 2013 Week 3 Lab

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Saving State

EMBEDDED SYSTEMS PROGRAMMING Android NDK

Android Programmierung leichtgemacht. Lars Vogel

Beginning Android 4 Application Development

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml

Android. Michael Greifeneder. Image source: Android homepage

Mobila applikationer och trådlösa nät, HI1033, HT2012

Database Development In Android Applications

Overview of Activities

Introduction to Android

Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time

Android Basics. Android UI Architecture. Android UI 1

Android Beginners Workshop

Android Ecosystem and. Revised v4presenter. What s New

Android Programming (5 Days)

ANDROID SYLLABUS. Advanced Android

Introduction to Android development

Mobile Application Development Lab [] Simple Android Application for Native Calculator. To develop a Simple Android Application for Native Calculator.

Android HelloWorld - Example. Tushar B. Kute,

University of Stirling Computing Science Telecommunications Systems and Services CSCU9YH: Android Practical 1 Hello World

Google Android on the Beagleboard

Mobile Application Development - Android

LifeStreet Media Android Publisher SDK Integration Guide

MODULE 2: GETTING STARTED WITH ANDROID PROGRAMMING

COSC 3P97 Mobile Computing

Mobile Application Development

Create Parent Activity and pass its information to Child Activity using Intents.

Solving an Android Threading Problem

Lecture 1 Introduction to Android. App Development for Mobile Devices. App Development for Mobile Devices. Announcement.

Android UI DateBasics

Android Programming Lecture 2 9/7/2011

EMBEDDED SYSTEMS PROGRAMMING UI Specification: Approaches

Mobile OS. Symbian. BlackBerry. ios. Window mobile. Android

Learn about Android Content Providers and SQLite

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Android for Ubiquitous Computing Researchers. Andrew Rice University of Cambridge 17-Sep-2011

MC Android Programming

Activities and Fragments

Lecture 1 - Introduction to Android

Android Exam AND-401 Android Application Development Version: 7.0 [ Total Questions: 129 ]

EMBEDDED SYSTEMS PROGRAMMING Android NDK

Mobile and Wireless Systems Programming

CS378 - Mobile Computing. Anatomy of an Android App and the App Lifecycle

Making use of Android

Lab 3. Accessing GSM Functions on an Android Smartphone

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

CS 4330/5390: Mobile Application Development Exam 1

Mobile Computing Fragments

States of Activities. Active Pause Stop Inactive

Xin Pan. CSCI Fall

Android Workshop: Model View Controller ( MVC):

CS260 Intro to Java & Android 05.Android UI(Part I)

Introduction to Android Development

The World of Android Development

Manifest.xml. Activity.java

Mobile Application Development

Simon Jackson Mike Bow Dan North Pete Hemery

App Development for Smart Devices. Lec #7: Audio, Video & Telephony Try It Out

G1 Development Environment and Applica4on Development. Adam C. Champion CSE 788X11 Prof. Dong Xuan

Developed and taught by well-known Contact author and developer. At public for details venues or onsite at your location.

ELET4133: Embedded Systems. Topic 15 Sensors

Android Application Model I. CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr.

CSCU9YH Development with Android

Android for Java Developers Dr. Markus Schmall, Jochen Hiller

Basic GUI elements - exercises

Google Android on the Beagleboard

Android. Mobile operating system developed by Google A complete stack. Based on the Linux kernel Open source under the Apache 2 license

Android Activities. Akhilesh Tyagi

CS260 Intro to Java & Android 05.Android UI(Part I)

Transcription:

Computer Science E-76 Building Mobile Applications Lecture 3: [Android] The SDK, Activities, and Views February 13, 2012 Dan Armendariz danallan@mit.edu 1

http://developer.android.com Android SDK and NDK 2

.java (code) javac (compiler).class (bytecode) dx (converter).dex (Dalvik executable) zip, aapt, etc. (archiver).apk (Android Package) Building an App 3

.java (code).apk (Android Package) Eclipse (IDE) Building an App 4

SDK 5

android - Android SDK manager. Create/ delete/view Android Virtual Devices and update the SDK with new platforms/add-ons. ddms - Dalvik Debug Monitor Server. Screen caps, thread/heap info, process/state info,.. SDK Tools 6

emulator - The application responsible for opening AVDs instances. sqlite3 - manage SQLite databases. SDK Tools 7

No support for placing or receiving actual phone calls. You can simulate phone calls (placed and received) through the emulator console, however. 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 SDK Emulator Limitations 8

# adb - Android Debug Bridge. A client/ server program that manages the state of an emulated device. # aapt - Android Asset Packaging Tool. # dx - The converter; converts.class files to Android bytecode. SDK Platform Tools 9

telnet localhost <console-port> console-port: 5554+2n where n is the emulator number (0th, 1st, 2nd) Use commands like: redir, power, geo, network, gsm, sms SDK Emulator Console 10

Data as of 1/3/2012. From: http://developer.android.com/resources/dashboard/platform-versions.html SDK Platform Versions 11

Data as of 2/1/2012. From: http://developer.android.com/resources/dashboard/platform-versions.html SDK Platform Versions 12

Data collected during 2 weeks in Jul 2010. From: http://developer.android.com/resources/dashboard/screens.html SDK Screen Sizes & Densities 13

Data collected over 1 week ending on 2/1/2012. From: http://developer.android.com/resources/dashboard/screens.html SDK Screen Sizes & Densities 14

package com.android.helloworld; import android.app.activity; import android.os.bundle; import android.widget.textview; public class HelloWorld extends Activity { /** Called when the activity is first created. */ @Override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); TextView tv = new TextView(this); tv.settext("hello, World!"); setcontentview(tv); } } Code adapted from: http://developer.android.com/resources/tutorials/hello-world.html Hello, World! 15

public class Activity extends ApplicationContext { protected void oncreate(bundle savedinstancestate); protected void onstart(); protected void onrestart(); protected void onresume(); protected void onpause(); protected void onstop(); } protected void ondestroy(); http://developer.android.com/reference/android/app/activity.html Activity Methods 16

http://developer.android.com/reference/android/app/activity.html Activity Lifecycle 17

TextView tv = new TextView(this); tv.settext("hello, Android"); or <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/hello"/> http://developer.android.com/resources/tutorials/hello-world.html Creating a UI 18

http://developer.android.com/guide/topics/ui/index.html Views Layouts 19

FrameLayout Gallery GridView LinearLayout ListView RelativeLayout ScrollView Spinner SurfaceView TabHost TableLayout ViewFlipper ViewSwitcher More: http://developer.android.com/reference/android/widget/package-summary.html Views Common Layouts 20

Computer Science E-76 Building Mobile Applications Lecture 3: [Android] The SDK, Activities, and Views February 13, 2012 Dan Armendariz danallan@mit.edu 21