27
What’s in an Android? Abdo El Ali 1 Victor de Boer 2 Andi Winterboer 3 1 ILPS (Information and Language Processing Systems) Group 2 Theoretical Computer Science Group 3 ISA (Intelligent Autonomous Systems) Group

What's in an Android?

Embed Size (px)

Citation preview

Page 1: What's in an Android?

What’s in an Android?

Abdo El Ali1 Victor de Boer2

Andi Winterboer3

1 ILPS (Information and Language Processing Systems) Group 2 Theoretical Computer Science Group 3 ISA (Intelligent Autonomous Systems) Group

Page 2: What's in an Android?

Outline

1.  What is Android?

2.  Android Basics

3.  Tutorial of a Toy Application: Text, Buttons, & Activities

2 Abdo El Ali – What’s in an Android?

Page 3: What's in an Android?

What is Android?   A first joined project of the Open Handset Alliance (OHA)

  A complete & modern embedded operating system

  A cutting-edge mobile user experience

  A world-class software stack for building applications

  An open platform for developers, users & industry   Full phone software stack including applications   Android is open   Android is free   Community support   100% Java Phone

3 Abdo El Ali – What is Android?

Page 4: What's in an Android?

Android Features   Software Features

  Integrated browser based on the open source WebKit engine   SQLite for relational data storage   Media support for common audio, video, and still image

formats(MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)   Dalvik Virtual Machine optimized for mobile devices

  Hardware Features   Cellular networking : GSM, EDGE, 3G (hardware dependent)   LAN : Bluetooth, and Wi-Fi (hardware dependent)   Graphics Hardware Acceleration   Camera, GPS and Compass (hardware dependent)   Touch screen and accelerometer for motion sensing

4 Abdo El Ali – What is Android?

Page 5: What's in an Android?

Android Architecture

5 Abdo El Ali – Android Workshop

Page 6: What's in an Android?

An Android Application can consist of…   Activities

  An application that has a visible UI is implemented with an activity. When a user selects an application from the home screen or application launcher, an activity is started.

  Services   A service should be used for any application that needs to persist

for a long time, such as a network monitor or update-checking application.

  Content providers   You can think of content providers as a database server. A content

provider's job is to manage access to persisted data, such as a SQLite database.

  Broadcast receivers   An Android application may be launched to process an element of

data or respond to an event, such as the receipt of a text message (notification).

6 Abdo El Ali – What is Android?

Page 7: What's in an Android?

Android Basics: Main components of Interest   AndroidManifest.xml:

  the control file-tells the system what to do with the top-level components

  Activity:   an object that has a life cycle and is a chunk of code that does

some work. Corresponds to a single screen.   View:

  an object that knows how to draw itself to the screen   Intent:

  a simple message object that represents an "intention" to do something. Consider an intent received when an event is triggered (e.g., a phone ring)

7 Abdo El Ali – Android Basics

Page 8: What's in an Android?

Android Development Tools   Android Emulator: A virtual mobile device that runs

on our computer; used to design, debug, and test our applications in an actual Android run-time environment

  Android Development Tools Plugin: For the Eclipse IDE; adds extensions to the Eclipse integrated environment

  Dalvik Debug Monitor Service (DDMS): Integrated with Dalvik -- this tool lets us manage processes on an emulator and assists in debugging

8 Abdo El Ali – Android Basics

Page 9: What's in an Android?

Eclipse Environment: Overview

9

Page 10: What's in an Android?

Eclipse Environment: Directory Structure

10 Abdo El Ali – Android Basics

Page 11: What's in an Android?

Eclipse Environment: Java Code

11 Abdo El Ali – Android Workshop

Page 12: What's in an Android?

Eclipse Environment: Screen Layout

12 Abdo El Ali – Android Workshop

Page 13: What's in an Android?

Eclipse Environment: XML Layout

13 Abdo El Ali – Android Workshop

Page 14: What's in an Android?

Eclipse Environment: Android Manifest File

14 Abdo El Ali – Android Workshop

Page 15: What's in an Android?

Android Example: Text, Buttons, & Activities

15 Abdo El Ali – Android Tutorial

  To learn about the interaction between your Layout XML file, your Java code, and your Manifest file

More precisely, you will learn:

1)  …how to declare an EditText box in your layout where the text can be set from your Java code

2)  …how to declare buttons and make them responsive to events (e.g., clicks or touch)

3)  …how to launch a new activity from the current activity

Page 16: What's in an Android?

Our Toy Application

16 Abdo El Ali – Android Tutorial

Page 17: What's in an Android?

Our Toy Application

17 Abdo El Ali – Android Tutorial

Page 18: What's in an Android?

1. Declare Elements in Your Layout file

18 Abdo El Ali – Android Tutorial

Page 19: What's in an Android?

1. Declare Elements in Your Layout file (Contd.)

19 Abdo El Ali – Android Tutorial

Page 20: What's in an Android?

2.1. Java Code: Declaring Variables, Finding Views, Setting Listeners

20 Abdo El Ali – Android Workshop

Page 21: What's in an Android?

2.2. Java Code: Declaring Methods for Event Handling (Contd.)

21 Abdo El Ali – Android Workshop

Page 22: What's in an Android?

3. Manifest: Declare New Activity & Intent

22 Abdo El Ali – Android Tutorial

Page 23: What's in an Android?

3.1. Activity: Create a New Activity

23 Abdo El Ali – Android Tutorial

Page 24: What's in an Android?

3.2. Activity: Java Code

24 Abdo El Ali – Android Tutorial

Page 25: What's in an Android?

3.3. Activity: Layout

25 Abdo El Ali – Android Tutorial

Page 26: What's in an Android?

Good luck!

26 Abdo El Ali – What’s in an Android?

Page 27: What's in an Android?

References

  Deep Inside Android… by Gilles Printemps

  Android: An Open-handset Alliance Project by Yedukk

  Introduction to Android Development by Frank Ableson

  Android Developer Site

27 Abdo El Ali – Android Workshop