Upload
abdo-el-ali
View
3.593
Download
2
Tags:
Embed Size (px)
Citation preview
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
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?
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?
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?
Android Architecture
5 Abdo El Ali – Android Workshop
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?
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
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
Eclipse Environment: Overview
9
Eclipse Environment: Directory Structure
10 Abdo El Ali – Android Basics
Eclipse Environment: Java Code
11 Abdo El Ali – Android Workshop
Eclipse Environment: Screen Layout
12 Abdo El Ali – Android Workshop
Eclipse Environment: XML Layout
13 Abdo El Ali – Android Workshop
Eclipse Environment: Android Manifest File
14 Abdo El Ali – Android Workshop
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
Our Toy Application
16 Abdo El Ali – Android Tutorial
Our Toy Application
17 Abdo El Ali – Android Tutorial
1. Declare Elements in Your Layout file
18 Abdo El Ali – Android Tutorial
1. Declare Elements in Your Layout file (Contd.)
19 Abdo El Ali – Android Tutorial
2.1. Java Code: Declaring Variables, Finding Views, Setting Listeners
20 Abdo El Ali – Android Workshop
2.2. Java Code: Declaring Methods for Event Handling (Contd.)
21 Abdo El Ali – Android Workshop
3. Manifest: Declare New Activity & Intent
22 Abdo El Ali – Android Tutorial
3.1. Activity: Create a New Activity
23 Abdo El Ali – Android Tutorial
↵
↵
3.2. Activity: Java Code
24 Abdo El Ali – Android Tutorial
3.3. Activity: Layout
25 Abdo El Ali – Android Tutorial
Good luck!
26 Abdo El Ali – 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