The Android GUI Framework Android experience day December 2008 Markus Pilz Peter Wlodarczak.

Slides:



Advertisements
Similar presentations
Android Application Development A Tutorial Driven Course.
Advertisements

Google Android Introduction to Mobile Computing. Android is part of the build a better phone process Open Handset Alliance produces Android Comprises.
Contents Different O.S. and platforms. Different programming languages. Possibilities for mobiles. GPS, digital compass, accelerometer,… Augmented reality.
Android architecture overview
Programming Mobile Applications with Android
Android Aims to bring Internet-style innovation and openness to mobile phones.
All About Android Introduction to Android 1. Creating a New App “These aren’t the droids we’re looking for.” Obi-wan Kenobi 1. Bring up Eclipse. 2. Click.
Application Fundamentals. See: developer.android.com/guide/developing/building/index.html.
Filip Debelić What is it? Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google Android,
ANDROID OPERATING SYSTEM Guided By,Presented By, Ajay B.N Somashekar B.T Asst Professor MTech 2 nd Sem (CE)Dept of CS & E.
Who Am I And Why Am I Here I’m professor Stephen Fickas in CIS – you can call me Steve. I have a research group that works with mobile devices (since 1995!)
User Interface Android Applications. Activities An activity presents a visual user interface. Each activity is given a default window to draw in. The.
1 CSCE 4013: Mobile Systems Programming Nilanjan Banerjee Mobile Systems Programming University of Arkansas Fayetteville, AR
Android 101 Application Fundamentals January 29, 2010.
Android Application Development with Java UPenn CS4HS 2011 Chris Murphy
Android Development (Basics)
@2011 Mihail L. Sichitiu1 Android Introduction Hello World.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
Creating Android user interfaces using layouts 1Android user interfaces using layouts.
Chien-Chung Shen Manifest and Activity Chien-Chung Shen
1 Mobile Software Development Framework: Android Activity, View/ViewGroup, External Resources, Listener 10/9/2012 Y. Richard Yang.
Mobile Programming Lecture 1 Getting Started. Today's Agenda About the Eclipse IDE Hello, World! Project Android Project Structure Intro to Activities,
Introduction to Android Programming Content Basic environmental structure Building a simple app Debugging.
Mobile Application Development with ANDROID Tejas Lagvankar UMBC 29 April 2009.
Mobile Application Development with ANDROID. Agenda Mobile Application Development (MAD) Intro to Android platform Platform architecture Application building.
About me Yichuan Wang Android Basics Credit goes to Google and UMBC.
Introducing the Sudoku Example
Mobile Computing Lecture#08 IntentFilters & BroadcastReceivers.
Mobile Programming Lecture 6
DUE Hello World on the Android Platform.
1 Announcements Homework #2 due Feb 7 at 1:30pm Submit the entire Eclipse project in Blackboard Please fill out the when2meets when your Project Manager.
10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Introduction to Android Overview of Android System Android Components Component.
Import import android.graphics.Bitmap; import android.widget.ImageView;
1 Introducing Activity and Intent. 2 Memory LinearLayout, weight=2 LinearLayout, weight=1 TextView ListView.
ANDROID – DRAWING IMAGES – SIMPLE EXAMPLE IN INTERFACE AND EVENT HANDLING L. Grewe.
Announcements Homework #2 will be posted after class due Thursday Feb 7, 1:30pm you may work with one other person No office hours tonight (sorry!) I will.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
Copyright© Jeffrey Jongko, Ateneo de Manila University Deconstructing HelloWorld.
Android Application Lifecycle and Menus
1 Android Development Lean and mean introduction Based on a presentation by Mihail L. Sichitiu.
Mobile Computing Lecture#12 Graphics & Animation.
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
Introduction to Android Chapter 1 1. Objectives Understand what Android is Learn the differences between Java and Android Java Examine the Android project.
The Basics of Android App Development Sankarshan Mridha Satadal Sengupta.
Android Programming.
Lab7 – Appendix.
Android Application -Architecture.
Lecture 3 Zablon Ochomo Android Layouts Lecture 3 Zablon Ochomo
Android Introduction Hello World
Android Application Development 1 6 May 2018
Android N Amanquah.
Adapting to Display Orientation
GUI Programming Fundamentals
ANDROID AN OPEN HANDSET ALLIANCE PROJECT
Android – Event Handling
Android Introduction Hello World.
Android.
Android Introduction Hello Views Part 1.
ITEC535 – Mobile Programming
CA16R405 - Mobile Application Development (Theory)
תכנות ב android אליהו חלסצ'י.
Application Development A Tutorial Driven Course
BMI Android Application will take weight and height from the users to calculate Body Mass Index (BMI) with the information, whether user is underweight,
CIS 470 Mobile App Development
Emerging Platform#3 Android & Programming an App
Android Development Introduction to Android Development 2011/01/16
Activities, Fragments, and Intents
Android Sensor Programming
CIS 694/EEC 693 Android Sensor Programming
Presentation transcript:

The Android GUI Framework Android experience day December 2008 Markus Pilz Peter Wlodarczak

Agenda 1. Introduction 2. Anatomy 3. A real word example 4. Life cycle 5. Trends 6. Findings

Why Android  Android was designed as a platform for software development  Android is open  Android is free  Community support  Tool support

Android Platform

Anatomy I  Android is Linux based  GUI is fully written in Java  Java 1.5 support  Widget toolkit  XML based GUI  Single Touch screen

Anatomy II  Activity  View  Service  Content provider  Intent, IntentFilter, IntertReceiver

Anatomy III  Storage  Security  Life cycle management  Native calls (not officially)‏  AIDL  NLS support

A real word example I  A translator for Android  You cannot read anything  If you are in a country where no one understands your language  No additional device needed  You have your mobile phone always with you

A real word example II  Uses the Google translator  Can be extended with new languages  Adaptive GUI  Uses XMPP for data transmission  GUI fully defined in XML

A real word example III Lets see it

A real word example IV  Used Eclipse for development  Uses persistence of user data  Uses touch screen and keyboard input  ANT script and make for build

A real word example V <manifest xmlns:android=" package="com.greenliff.translator"> The AndroidManifest.xml

A real word example V <manifest xmlns:android=" package="com.greenliff.translator"> The AndroidManifest.xml Activity

A real word example V <manifest xmlns:android=" package="com.greenliff.translator"> The AndroidManifest.xml Activity Launch

A real word example VI The AndroidManifest.xml  Used for security  Give other Activities access  Define permissions, e. g.

A real word example VII <ScrollView xmlns:android=" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scrollbars="vertical"> <LinearLayout xmlns:android=" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="Type here..." />..... An XML snipped of the main Activity Text reference

A real word example VII <ScrollView xmlns:android=" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scrollbars="vertical"> <LinearLayout xmlns:android=" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="Type here..." />..... An XML snipped of the main Activity Text reference Id

A real word example VIII  Could also be developed purely in Java  Not all the attributes can be defined in XML  XML cannot be debugged

A real word example public void onCreate(Bundle icicle) { super.onCreate(icicle); Window wp = getWindow(); mContext = wp.getContext(); setTheme(android.R.style.Theme_Light); setContentView(R.layout.main); mLayout = (LinearLayout) this.findViewById(R.id.linLayout); mToTranslate = (EditText) this.findViewById(R.id.toTranslate); setShowLanguages(); mEnge = (LinearLayout) this.findViewById(R.id.enge); LANGUAGE_LAYOUT[0] = mEnge; de2en = (Button) this.findViewById(R.id.de2en); de2en.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { if(!connect()) { notLoggedInAlert(); } else { rearrange(mEnge); } });.... A code snipped of the Translate Activity

A real word example public void onCreate(Bundle icicle) { super.onCreate(icicle); Window wp = getWindow(); mContext = wp.getContext(); setTheme(android.R.style.Theme_Light); setContentView(R.layout.main); mLayout = (LinearLayout) this.findViewById(R.id.linLayout); mToTranslate = (EditText) this.findViewById(R.id.toTranslate); setShowLanguages(); mEnge = (LinearLayout) this.findViewById(R.id.enge); LANGUAGE_LAYOUT[0] = mEnge; de2en = (Button) this.findViewById(R.id.de2en); de2en.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { if(!connect()) { notLoggedInAlert(); } else { rearrange(mEnge); } });.... A code snipped of the Translate Activity Set layout

A real word example public void onCreate(Bundle icicle) { super.onCreate(icicle); Window wp = getWindow(); mContext = wp.getContext(); setTheme(android.R.style.Theme_Light); setContentView(R.layout.main); mLayout = (LinearLayout) this.findViewById(R.id.linLayout); mToTranslate = (EditText) this.findViewById(R.id.toTranslate); setShowLanguages(); mEnge = (LinearLayout) this.findViewById(R.id.enge); LANGUAGE_LAYOUT[0] = mEnge; de2en = (Button) this.findViewById(R.id.de2en); de2en.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { if(!connect()) { notLoggedInAlert(); } else { rearrange(mEnge); } });.... A code snipped of the Translate Activity Set layout Find elements

A real word example public void onCreate(Bundle icicle) { super.onCreate(icicle); Window wp = getWindow(); mContext = wp.getContext(); setTheme(android.R.style.Theme_Light); setContentView(R.layout.main); mLayout = (LinearLayout) this.findViewById(R.id.linLayout); mToTranslate = (EditText) this.findViewById(R.id.toTranslate); setShowLanguages(); mEnge = (LinearLayout) this.findViewById(R.id.enge); LANGUAGE_LAYOUT[0] = mEnge; de2en = (Button) this.findViewById(R.id.de2en); de2en.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { if(!connect()) { notLoggedInAlert(); } else { rearrange(mEnge); } });.... A code snipped of the Translate Activity Set layout Find elements Add behavior

A real word example public boolean onOptionsItemSelected(Menu.Item item) { switch (item.getId()) { case 0: showLogin(); break; case 1: Intent intent = new Intent(Translate.this, Settings.class); intent.putExtras(mShownLanguages); startSubActivity(intent, SETTINGS); break; } // switch return true; } Call an other Activity

A real word example public boolean onOptionsItemSelected(Menu.Item item) { switch (item.getId()) { case 0: showLogin(); break; case 1: Intent intent = new Intent(Translate.this, Settings.class); intent.putExtras(mShownLanguages); startSubActivity(intent, SETTINGS); break; } // switch return true; } Call an other Activity Start an Activity

A real word example public boolean onOptionsItemSelected(Menu.Item item) { switch (item.getId()) { case 0: showLogin(); break; case 1: Intent intent = new Intent(Translate.this, Settings.class); intent.putExtras(mShownLanguages); startSubActivity(intent, SETTINGS); break; } // switch return true; } Call an other Activity Start an Activity Pass data to new Activity

A real word example protected void onPause() { super.onPause(); SharedPreferences.Editor ed = mPrefs.edit(); for(int i = 0; i < SUPPORTED_LANGUAGES.length; i++) { ed.putBoolean(SUPPORTED_LANGUAGES[i], mShownLanguages.getBoolean(SUPPORTED_LANGUAGES[i])); } ed.commit(); } Store user data Persistent store

A real word example XII Store user data  Preferences  Files  Content provider  Database  Network

Life cycle  Life cycle not directly controlled by application  Controll through onCreate(), onPause(), onStop()... methods  Android has different types of processes, visible processes, service processes, background processes...  System can kill an application to free up memory  Services can be used for long-lived background processes

Trends I  Eyes-free user interfaces  Other user interfaces like tones, vibrant alarm, sensors, actuators  Leverage hearing and touch  Camera input Ubiquitous computing technologies

Trends II  Speech recognition  Accelerometer  Magnetic compass  Location self-awareness Locating others Sensing the environment

Findings  Android uses proven technology like Java, XML and Linux  There is an initial learning effort  Android doesn‘t have many of the limitations other mobile platforms have  It offers a rich API for application development  Trend towards eyes-free user interfaces

Some figures  Q more than 3 billion mobile subscribers (world population 6.7 billion)‏  1.14 billion handsets delivered in 2007 (computers million)‏  118 million where smart phones  Currently more than 30 mobile platforms  Symbian leads with 65% share, ahead of Microsoft on 12%, RIM on 11%, Apple on 7%, and Linux at 5%

Thank you for the attention Questions? Find out more at: