android intro 2010
DESCRIPTION
TRANSCRIPT
![Page 1: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/1.jpg)
Androidby Bram Vandeputte
Friday 15 October 2010
![Page 2: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/2.jpg)
Inleiding
• Wat ?
• Verzameling van software-componenten
• Voor mobiele toestellen
• Open Source
• Bevat :
• Besturingssysteem
• Middleware
• Standaard applicaties
Friday 15 October 2010
![Page 3: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/3.jpg)
Inleiding
• Ontwikkelen
• Java
• Android SDK
• emulator
• tools
• API’s
• Externe API’s : Google API
• Eclipse plug-in
Friday 15 October 2010
![Page 4: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/4.jpg)
Features• Application framework : enables reuse and replacement of
components
• Dalvik virtual machine : optimized for mobile devices
• Integrated browser based on the open source WebKit engine
• Optimized graphics : custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)
• SQLite for structured data storage
• Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
• hardware dependent : GSM Telephony, Bluetooth, EDGE, 3G, WiFi, Camera, GPS, compass, and accelerometer.
Friday 15 October 2010
![Page 5: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/5.jpg)
Architectuur
Friday 15 October 2010
![Page 6: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/6.jpg)
Basics : Componenten• App : no single entry point (main)
• Activity : scherm
• bestaat uit Views
• reageert op Events
• Service : geen UI (bvb. music playback)
• Broadcast Receiver : ontvang & reageer
• Content provider : data delen
Friday 15 October 2010
![Page 7: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/7.jpg)
Basics
• Componenten activeren :
• Intent : asynchrone berichten
• Om Activity, Service of Broadcast Receiver aan te spreken
• Intent filters
• Content Resolver
• Om Content Provider aan te spreken
Friday 15 October 2010
![Page 8: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/8.jpg)
Basics (bis)
• AndroidManifest : omschrijving applicatie
• Layout
• Resources
Friday 15 October 2010
![Page 9: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/9.jpg)
Basics (bis)
• AndroidManifest : omschrijving applicatie
• Layout
• Resources
Friday 15 October 2010
![Page 10: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/10.jpg)
Basics (bis)
• AndroidManifest : omschrijving applicatie
• Layout
• Resources
Friday 15 October 2010
![Page 11: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/11.jpg)
Basics (bis)
• AndroidManifest : omschrijving applicatie
• Layout
• Resources
Friday 15 October 2010
![Page 12: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/12.jpg)
Basics (bis)
• AndroidManifest : omschrijving applicatie
• Layout
• Resources
Friday 15 October 2010
![Page 13: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/13.jpg)
Basics (bis)
• AndroidManifest : omschrijving applicatie
• Layout
• Resources
Friday 15 October 2010
![Page 14: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/14.jpg)
Basics (bis)
• AndroidManifest : omschrijving applicatie
• Layout
• Resources
Friday 15 October 2010
![Page 15: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/15.jpg)
Component Lifecycles
Friday 15 October 2010
![Page 16: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/16.jpg)
Activity
Friday 15 October 2010
![Page 17: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/17.jpg)
Service
Friday 15 October 2010
![Page 18: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/18.jpg)
Getting Started
• Get :
• android-sdk-<your platform>
• Add Android 2.2 platform
• eclipse + ADT plugin
• Links : http://bit.ly/af8h7z
Friday 15 October 2010
![Page 19: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/19.jpg)
Hello Android
Friday 15 October 2010
![Page 20: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/20.jpg)
Hello Android
• app :• http://developer.android.com/guide/tutorials/hello-world.html
• Init : maak een AVD
• emulator :• export PATH=${PATH}:/MY/PATH/TO/THE/android-sdk/tools/
• emulator
Friday 15 October 2010
![Page 21: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/21.jpg)
Hello Android
Friday 15 October 2010
![Page 22: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/22.jpg)
Hello Android
• tools :• debugging (Eclipse)
• adb
• set PATH
• adb shell
• sqlite3 data
• .dump
• LogCat
Friday 15 October 2010
![Page 23: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/23.jpg)
Notepad tutorial• http://developer.android.com/guide/tutorials/notepad
• http://bit.ly/android-tutorial
• Exercise 1
• Exercise 2
• optional :
• Exercise 3
• Extra credit (debugging)
• uitbreiding
Friday 15 October 2010
![Page 24: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/24.jpg)
MyGpsApp
• gps mock data
Friday 15 October 2010
![Page 25: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/25.jpg)
MyGpsApp
• opbouw
• create textview
• LocationManager & LocationListener
• permissions : AndroidManifest.xml
• update textview
Friday 15 October 2010
![Page 26: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/26.jpg)
MyGpsApp
• Add Google Maps
• http://developer.android.com/guide/tutorials/views
Friday 15 October 2010
![Page 27: Android intro 2010](https://reader034.vdocuments.pub/reader034/viewer/2022051514/549f4c33ac7959554c8b4809/html5/thumbnails/27.jpg)
Extra
• http://developer.android.com/guide
• API demos
• http://www.anddev.org
• sdcard
Friday 15 October 2010