Android Development Tutorial. Human-Computer Interaction II (COMP 4020) Winter 2013



Similar documents
MMI 2: Mobile Human- Computer Interaction Android

Android 多 核 心 嵌 入 式 多 媒 體 系 統 設 計 與 實 作

Mobile Application Development

Basic Android Setup Windows Version

Android Development. Marc Mc Loughlin

Smartphone market share

Chapter 2 Getting Started

Basics. Bruce Crawford Global Solutions Manager

An Introduction to Android

Android Concepts and Programming TUTORIAL 1

Getting Started With Android

Installing the Android SDK

Android Programming. Høgskolen i Telemark Telemark University College. Cuong Nguyen,

Android Programming and Security

ANDROID APP DEVELOPMENT: AN INTRODUCTION CSCI /19/14 HANNAH MILLER

Jordan Jozwiak November 13, 2011

Developing an Android App. CSC207 Fall 2014

Fahim Uddin 1. Java SDK

Android Application Development. Yevheniy Dzezhyts

ADITION Android Ad SDK Integration Guide for App Developers

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

Android Introduction. Hello Mihail L. Sichitiu 1

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

Android App Development. Rameel Sethi

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

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

How To Run A Hello World On Android (Jdk) On A Microsoft Ds.Io (Windows) Or Android Or Android On A Pc Or Android 4 (

Introduction to Android

Tutorial on Basic Android Setup

Android Application Development: Hands- On. Dr. Jogesh K. Muppala

Arduino & Android. A How to on interfacing these two devices. Bryant Tram

Workshop on Android and Applications Development

Create Your Own Android App Tools Using ArcGIS Runtime SDK for Android

Developing Android Applications: Case Study of Course Design

Android Tutorial. Larry Walters OOSE Fall 2011

Android Mobile App Building Tutorial

Location-Based Services Design and Implementation Using Android Platforms

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)

Android Setup Phase 2

1) SETUP ANDROID STUDIO

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

Getting Started: Creating a Simple App

How to Create an Android Application using Eclipse on Windows 7

Lab 0 (Setting up your Development Environment) Week 1

Tutorial #1. Android Application Development Advanced Hello World App

Developing Android Apps: Part 1

Android Development. 吳 俊 興 國 立 高 雄 大 學 資 訊 工 程 學 系

Presenting Android Development in the CS Curriculum

OpenCV on Android Platforms

Android For Java Developers. Marko Gargenta Marakana

ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android

Android Environment SDK

Getting Started with Android Development

About this Release. Introduction. Prerequisites. Installation. Using the Web SDK Packager

01. Introduction of Android

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

Now that we have the Android SDK, Eclipse and Phones all ready to go we can jump into actual Android development.

With a single download, the ADT Bundle includes everything you need to begin developing apps:

Android Development Tutorial. Nikhil Yadav CSE40816/ Pervasive Health Fall 2011

ITG Software Engineering

Building an Android client. Rohit Nayak Talentica Software

Android Basics. Xin Yang

Introduction to Android

Android Bootcamp. Elaborado (com adaptações) a partir dos tutoriais:

Mocean Android SDK Developer Guide

Open Source Telemedicine Android Client Development Introduction

Building Your First App

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

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

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

Introduction to Android

Android Apps Development Boot Camp. Ming Chow Lecturer, Tufts University DAC 2011 Monday, June 6, 2011

How To Develop An Android App On An Android Device

Full version is >>> HERE <<<

Tutorial: Setup for Android Development

Beginning Android Programming

How to Set Up Your PC for Android Application Development

Introduction to Android Development

By sending messages into a queue, we can time these messages to exit the cue and call specific functions.

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

Android Application Development - Exam Sample

06 Team Project: Android Development Crash Course; Project Introduction

Praktikum Entwicklung Mediensysteme (für Master)

More information >>> HERE <<<

Android, Bluetooth and MIAC

Tutorial: Android Object API Application Development. SAP Mobile Platform 2.3 SP02

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

Android Environment SDK

Introduction to Android SDK Jordi Linares

IBM TRIRIGA Anywhere Version 10 Release 4. Installing a development environment

Introduction to Android Programming (CS5248 Fall 2015)

How to Set Up Your PC for Android Application Development

Setting Up Your Android Development Environment. For Mac OS X (10.6.8) v1.0. By GoNorthWest. 3 April 2012

Transcription:

Android Development Tutorial Human-Computer Interaction II (COMP 4020) Winter 2013

Mobile OS Symbian ios BlackBerry Window Phone Android.

World-Wide Smartphone Sales (Thousands of Units)

Android Phones Sony X10 HTC G1 Samsung i7500 HTC Hero Motorola Cliq HTC Magic Samsung Moment Motorola Droid HTC Tattoo

Features Linux OS kernel Java programming Open source libraries: SQLite, WebKit, OpenGL A simple and powerful SDK No licensing, distribution, or development fees Development over many platform Linux, Mac OS, windows Excellent documentation

Installation

Java Runtime Environment (JRE) Java Development Kit (JDK) Android Developer Tools Bundle (ADT Bundle) Eclipse + ADT plugin Android SDK Tools Android Platform-tools The latest Android platform The latest Android system image for the emulator

http://www.java.com/en/download/installed.jsp

http://www.java.com/en/download/installed.jsp

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Java Runtime Environment (JRE) Java Development Kit (JDK) Android Developer Tools Bundle (ADT Bundle) Eclipse + ADT plugin Android SDK Tools Android Platform-tools The latest Android platform The latest Android system image for the emulator

http://developer.android.com/sdk/index.html

The workspace is the physical location you are working in Your projects, source files, images and other artifacts can be stored in your workspace

Android SDK Manager

Android Virtual Device Manager

Enable USB Debugging on device Utilized to copy data between your device and computer. For Android 3.2 or below: Settings > Applications > Development > USB debugging For Others: Settings > Developer Options > USB debugging.

File -> New -> Android Application Project

Folder Structure For Android Project Src Folder (Source folder) contains the java code of the application.

Folder Structure For Android Project res Folder (Resource folder): contains all the resources required like images, layouts and values.

Folder Structure For Android Project gen Folder: contains java files generated by ADT. These files have references to various resources placed in the application. It contains a special class R which contains all these references.

Common Layouts Image Source: http://android-meda.blogspot.ca/2012/02/tutorial-using-layouts-in-your-android.html

Layouts

android:id="@+id/resid" Create new resource ID named resid in the namespace of your application android:text= MyText" Further redirection to /res/values/strings.xml

Folder Structure For Android Project Manifest file:describe the application Declare app s name, version, icon, permission, etc Declare the application's components: activity, service,receiver or provider

Core Components Activity An activity is a user interface screen An application might consist of just one activity or several

Core Components Intent An Intent is an object that provides runtime binding between separate components (such as two activities). Activity Intent Activity A Context (global information about an application environment) as its first parameter The Class of the app component to which the system should deliver the Intent

Activity Example

Activity Example

Activity Example

Activity Example Inherit from the Activity Class Set the layout of the view as described in the activity_main.xml layout

Activity Example

Activity Example

Accelerometer Example An accelerometer is defined as an instrument for measuring the time rate of change of velocity with respect to magnitude or direction. 125.5 0.0 0.0

Step 1-> Layout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:paddingtop="20dip" android:text="shaker Demo" android:textsize="16sp" android:textstyle="bold" /> <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingtop="10dip" android:stretchcolumns="*" > <TableRow> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="x-axis" android:textsize="14sp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="y-axis" android:textsize="14sp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="z-axis" android:textsize="14sp" /> </TableRow> <TableRow> <TextView android:id="@+id/x_axis" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" /> <TextView android:id="@+id/y_axis" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" /> <TextView android:id="@+id/z_axis" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" /> </TableRow> </TableLayout> <ImageView android:id="@+id/image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:paddingtop="15dip" android:visibility="invisible" /> </LinearLayout>

Step 2 -> Java Main File

Step 2 -> Java Main File http://developer.android.com/reference/android/app/activity.html# ActivityLifecycle

Accelerometer Example 125.5 0.0 0.0

Question?