User Interface Design & Development

Similar documents
Android Overview. Most of the material in this section comes from

Introduction To Android

application components

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

Agenda. Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen

Android Application Development

Android Development Tutorial. Yi Huang

Applications. Marco Ronchetti Università degli Studi di Trento

Upon completion of the second part of the lab the students will have:

Developer s overview of the Android platform

Android Ecosystem and. Revised v4presenter. What s New

Group B: Assignment No 8. Title of Assignment: To verify the operating system name and version of Mobile devices.

Android Software Development Kit (Part I)

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

Introduction to Android

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

Our First Android Application

Android Application Model I

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

Android Fundamentals - Part 1

Android App Development. Mr. Michaud ICE Programs Georgia Institute of Technology

Introduction to Android

Course Learning Outcomes (CLO): Student Outcomes (SO):

Chapter 1 Hello, Android

Android App Development. Muhammad Sharjeel COMSATS Institute of Information Technology, Lahore

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

Introduction What is Android?

INTRODUCTION TO ANDROID

Minds-on: Android. Session 2

EMBEDDED SYSTEMS PROGRAMMING Application Basics

Android HelloWorld - Example. Tushar B. Kute,

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

CS260 Intro to Java & Android 04.Android Intro

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

UNIT:2 Introduction to Android

Syllabus- Java + Android. Java Fundamentals

Real-Time Embedded Systems

BCA 6. Question Bank

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

An Overview of the Android Programming

Android - open source mobile platform

The Internet. CS 2046 Mobile Application Development Fall Jeff Davidson CS 2046

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

Agenda. The Android GUI Framework Introduction Anatomy A real word example Life cycle Findings

Android App Development

Android System Architecture. Android Application Fundamentals. Applications in Android. Apps in the Android OS. Program Model 8/31/2015

ANDROID SYLLABUS. Advanced Android

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

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

Software Development & Education Center ANDROID. Application Development

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi

Embedded Systems Programming - PA8001

Meniu. Create a project:

ANDROID APPS DEVELOPMENT FOR MOBILE GAME

Mobile Application Development - Android

Mobile Computing Practice # 2c Android Applications - Interface

Android. Operating System and Architecture. Android. Screens. Main features

Programming Android UI. J. Serrat Software Design December 2017

CS 528 Mobile and Ubiquitous Computing Lecture 3b: Android Activity Lifecycle and Intents Emmanuel Agu

Software Practice 3 Before we start Today s lecture Today s Task Team organization

Multiple Activities. Many apps have multiple activities

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

CS378 -Mobile Computing. Services and Broadcast Receivers

Android for Java Developers Dr. Markus Schmall, Jochen Hiller

Android Basics. - Bhaumik Shukla Android Application STEALTH FLASH

CS 4330/5390: Mobile Application Development Exam 1

Building User Interface for Android Mobile Applications II

Mobile Computing LECTURE # 2

Android UI Development

Xin Pan. CSCI Fall

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

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

Introduction to Android Development

CMSC436: Fall 2013 Week 3 Lab

Comp 595MC/L: Mobile Computing CSUN Computer Science Department Fall 2013 Midterm

Minds-on: Android. Session 1

Action Bar. (c) 2010 Haim Michael. All Rights Reserv ed.

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

ITG Software Engineering

Security model. Marco Ronchetti Università degli Studi di Trento

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Android Navigation Drawer for Sliding Menu / Sidebar

IGEEKS TECHNOLOGIES. Software Training Division. Academic Live Projects For BE,ME,MCA,BCA and PHD Students

Solving an Android Threading Problem

Android App Development

Programming in Android. Nick Bopp

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Application Fundamentals

ORACLE UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

Building MyFirstApp Android Application Step by Step. Sang Shin Learn with Passion!

MVC Apps Basic Widget Lifecycle Logging Debugging Dialogs

Android Programming in Bluetooth Cochlea Group

PAPER ON ANDROID ESWAR COLLEGE OF ENGINEERING SUBMITTED BY:

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

Android Online Training

Overview. What are layouts Creating and using layouts Common layouts and examples Layout parameters Types of views Event listeners

Android Programming - Jelly Bean

Android Overview. Francesco Mercaldo, PhD

A Crash Course to Android Mobile Platform

Android Basics. Android UI Architecture. Android UI 1

Transcription:

User Interface Design & Development Lecture Intro to Android João Pedro Sousa SWE 632, Fall 2011 George Mason University features multitasking w/ just-in-time compiler for Dalvik-VM bytecode storage on SQLite networking GSM/EDGE, Bluetooth, Wi-Fi, WiMAX, 4G LTE, etc. messaging: SMS, MMS web browser: WebKit with Chrome engine media support: mp3, mp4, wav, jpeg, etc. streaming support: RTP, html progressive, Adobe Flash, etc. sensors multi-touch display, GPS, accelerometers, gyroscopes, cameras Intro to Android 2 1

system layers Intro to Android 3 apps bundled as an Android package file.apk may be downloaded to a phone or emulated in Eclipse by default runs in its own process associated with a uid for isolation, each process runs on its own VM may share files with other apps with the same uid may share a process and VM with other apps with the same uid app components may render services for other apps no single entry point, i.e. main no need to link other code: communication by intents Intro to Android 4 2

apps don t control their own process termination processes remain alive until OS terminates them decision based on memory availability importance foreground: interacting with user visible: on the screen but paused service: executing, e.g. playing music, but not visible background: not executing and not visible, i.e. stopped empty: inactive app, just a cache to improve startup time upshot user navigates back instead of closing windows Intro to Android 5 types of components activity, i.e. user interaction activity a UI may include many service, i.e. ongoing background process may expose a control api broadcast receiver, reacts to intents, i.e. control msgs sent by activities & services content provider facilitates data sharing among apps via SQLite Intro to Android 6 3

activity single focused thing i.e. interaction a user can do typically presented as full-screen window may use floating window or be embedded in an activity group examples from the NotePad sample code: public class NotesList extends ListActivity public class NoteEditor extends Activity public class TitleEditor extends Activity ListActivity -> menu -> Intro to Android 7 activity associated with layout resource public void setcontentview (int layoutresid) inflates the resource, i.e. shows it and its parents layouts may be created in XML programmatically examples: Intro to Android 8 4

example layout in XML NotePad.TitleEditor <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:paddingleft="6dip" android:paddingright="6dip" android:paddingbottom="3dip"> <EditText android:id="@+id/title" android:maxlines="1" android:layout_margintop="2dip" android:layout_width="wrap_content" android:ems="25" android:layout_height="wrap_content" android:autotext="true" android:capitalize="sentences" android:scrollhorizontally="true" /> <Button android:id="@+id/ok" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right" android:text="@string/button_ok" /> </LinearLayout> public void oncreate() { Button b = (Button) findviewbyid(r.id.ok); b.setonclicklistener(this); look at res.values.strings.xml Intro to Android 9 activity lifecycle activity may be active/running: screen foreground paused: lost focus but visible stopped: not visible VM issues callbacks to an activity as the user interacts with phone upshot: an activity has little control over the flow of interaction announces intents that will be picked up by other activities Intro to Android 10 5

intents facilitate communication between activities example: the activity menu for NotesList generates intents @Override public boolean oncreateoptionsmenu(menu menu) { // This is our one standard application action -- inserting a new note into the list. menu.add(0, MENU_ITEM_INSERT, 0, R.string.menu_insert).setShortcut('3', 'a').seticon(android.r.drawable.ic_menu_add); } @Override public boolean onoptionsitemselected(menuitem item) { switch (item.getitemid()) { case MENU_ITEM_INSERT: // Launch activity to insert a new item startactivity(new Intent(Intent.ACTION_INSERT, getintent().getdata())); return true; } } predefined String android.content.intent.action_insert = "android.intent.action.insert" Intro to Android 11 manifest file declares app components and supported intents which the NoteEditor catches manisfest example: NotePad <manifest package="com.example.android.notepad > <application android:icon="@drawable/app_notes android:label="@string/app_name > <> <activity android:name="noteslist" android:label="@string/title_notes_list"> <> <intent-filter> <action android:name="android.intent.action.view" /> <action android:name="android.intent.action.edit" /> </intent-filter> </activity> <activity android:name="noteeditor > <intent-filter> <action android:name="android.intent.action.insert" /> </application> </manifest> also the place to set up permissions to pass intents to other apps Intro to Android 12 6

intents are processed oncreate() and the NoteEditor processes @Override protected void oncreate() { final Intent intent = getintent(); final String action = intent.getaction(); } if (Intent.ACTION_EDIT.equals(action)) { // Requested to edit: set that state, and the data being edited. } else if (Intent.ACTION_INSERT.equals(action)) { // Requested to insert: set that state, and create a new entry in the container. Intro to Android 13 getting started follow the instructions on the assignments page cs.gmu.edu/~jpsousa/classes/632/ to download and start an emulation note: the android emulator window has different looks for each API level level 7 looks like this : then, get started on Lab 1 based on NotePad Intro to Android 14 7