Androide tu torial
Dr. Marco Antonio Ramos Corchado marco.corchado@gmail.com Facultad de Ingeniería, Universidad Autónoma del Estado de
México.
JAVA
Basic Java programming
Exceptions Inner Class, Interface
Advanced topics we will touch:
Java IO Java Thread Java Socket
pages.cs.wisc.edu/~hasti/cs368/JavaTutorial/
ANDROID BASICS
Google andUMBC
AGENDA
Mobile Application Development (MAD) Intro to Android platform Platform architecture Application building blocks Development tools Hello Android
INTRODUCTION TO ANDROID
Open software platform for mobile
development A complete stack – OS, Middleware, Applications An Open Handset Alliance (OHA) project Powered by Linux operating system Fast applicationdevelopment in Java Open source under the Apache 2 license
WHAT IS THE OPEN HANDSET ALLIANCE (OHA)?
→ It's a consortium of several companies
FEW REASONS TO GO MAD…
Smart Phones Internet access anywhere Social networking Millions of mobile users Open standards
ARCHITECTURE ANDROID
LINUX KERNEL
• • • • • Works as a HAL Device drivers Memory management Processmanagement Networking
LIBRARIES
• • • • • C/C++ libraries Interface through Java Surface manager – Handling UI Windows 2D and 3D graphics Media codecs, SQLite, Browser engine
ANDROID RUNTIME
• Dalvik VM – Dex files – Compact and efficient than class files – Limited memory and battery power • Core Libraries – Java 5 Std edition – Collections, I/O etc…
APPLICATIONFRAMEWORK
• API interface • Activity manager – manages application life cycle.
APPLICATIONS
• Built in and user apps • Can replace built in apps
AGENDA
Mobile Application Development (MAD) Intro to Android platform Platform architecture Application building blocks Development tools Hello Android
APPLICATION BUILDING BLOCKS
Activity IntentReceiver Service ContentProvider
ACTIVITIES
Typically
correspond to one UI screen
But, they can:
Be faceless Be in a floating window Return a value
INTENTRECEIVERS
Components that respond to broadcast ‘Intents’
Way to respond to external notification or alarms Apps can invent and broadcast their own Intent
INTENTS
Think of Intents as a verb and object; a
descriptionof what you want done E.g. VIEW, CALL, PLAY etc.. System matches Intent with Activity that can best provide the service Activities and IntentReceivers describe what Intents they can service
INTENTS
Home Picasa Photo Gallery
Contacts
Pick photo
GMail
System picks best component for that action Client component makes a request for a specific action
Chat
New componentscan use existing functionality
Blogger Blogger
SERVICES
Faceless components that run in the
background E.g. music player, network download etc…
CONTENTPROVIDERS
Enables sharing of data across applications E.g. address book, photo gallery Provides uniform APIs for: querying delete, update and insert. Content is represented by URI and MIME type
AGENDA
MobileApplication Development (MAD) Intro to Android platform Platform architecture Application building blocks Development tools Hello Android
DEVELOPMENT TOOLS
Eclipse “Official”, free Intellij Idea 8.0 or 9.0, licensed. I like more. Android SDK 1.0-2.2
http://developer.android.com
THE EMULATOR
• QEMU-based ARM emulator • Runs the same image as the device • Limitations:– No Camera support
DEVICES
Google Devices
Actually many trade marks use adroid in yours devices.
INSTALLING THE ANDROID SDK
Platform
Mac OS X Intel Linux X86 Windows
In particular, you may need to install the JDK (version 5 or 6), Eclipse
version 3.4 or 3.5 or Intellij Idea version 8.0 or 9.0 needed to develop using the ADT Plugin. More information in:...
Regístrate para leer el documento completo.