SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Downloaden Sie, um offline zu lesen
Android:	
  	
  
A	
  9,000-­‐foot	
  
 Overview	
  

  Marko	
  Gargenta	
  
    Marakana	
  
Agenda	
  
•    Android	
  History	
  
•    Android	
  and	
  Java	
  
•    The	
  Stack	
  
•    Android	
  SDK	
  
•    Hello	
  World!	
  
•    Main	
  Building	
  Blocks	
  
•    Android	
  User	
  Interface	
  
•    Debugging	
  
•    Summary	
  
History	
  
2005	
     Google	
  buys	
  Android,	
  Inc.	
  
           Work	
  on	
  Dalvik	
  starts	
  


2007	
     OHA	
  Announced	
  
           Early	
  SDK	
  


2008	
     G1	
  Announced	
  
           SDK	
  1.0	
  Released	
  


2009	
     G2	
  Released	
  
           Cupcake,	
  Donut,	
  Eclair	
  
Android	
  and	
  Java	
  

Android Java =
Java SE –
AWT/Swing +
Android API
ANDROID	
  STACK	
  
The	
  Stack	
  
Linux	
  Kernel	
  
Android runs on Linux.                                        Applications


                                    Home      Contacts          Phone             Browser              Other

Linux provides as well as:
    Hardware abstraction layer                            Application Framework
    Memory management              Activity        Window                    Content                   View

    Process management
                                   Manager         Manager                  Providers                 System

                                   Package    Telephony         Resource           Location            Notiication
    Networking                     Manager     Manager          Manager            Manager             Manager


                                                                Libraries
Users never see Linux sub system   Surface       Media
                                                                   SQLite                  Android Runtime
                                   Manager     Framework

                                                                                                 Core Libs

The adb shell command opens        OpenGL      FreeType            WebKit

                                                                                                  Delvik
Linux shell                          SGL          SSL               libc
                                                                                                   VM




                                    Display    Camera         Linux Kernel              Flash                Binder
                                    Driver      Driver                                  Driver               Driver

                                    Keypad      WiFi                                    Audio                Power
                                     Driver     Driver                                  Driver               Mgmt
NaXve	
  Libraries	
  
Bionic, a super fast and small                                Applications


GPL-based libc library optimized    Home      Contacts          Phone             Browser              Other

for embedded use
                                                          Application Framework
Surface Manager for composing      Activity        Window                    Content                   View

window manager with off-screen     Manager         Manager                  Providers                 System


buffering
                                   Package    Telephony         Resource           Location            Notiication
                                   Manager     Manager          Manager            Manager             Manager


                                                                Libraries
2D and 3D graphics hardware        Surface       Media
                                                                   SQLite                  Android Runtime
support or software simulation
                                   Manager     Framework

                                                                                                 Core Libs
                                   OpenGL      FreeType            WebKit

                                                                                                  Delvik
Media codecs offer support for       SGL          SSL               libc
                                                                                                   VM

major audio/video codecs
                                    Display    Camera         Linux Kernel              Flash                Binder
                                                                                        Driver               Driver
SQLite database
                                    Driver      Driver

                                    Keypad      WiFi                                    Audio                Power
                                     Driver     Driver                                  Driver               Mgmt


WebKit library for fast HTML
rendering
Dalvik	
  
Dalvik VM is Google’s implementation of Java

Optimized for mobile devices




Key Dalvik differences:

    Register-based versus stack-based VM
    Dalvik runs .dex files
    More efficient and compact implementation
    Different set of Java libraries than SDK
ApplicaXon	
  Framework	
  
Activation manager controls the life                              Applications


cycle of the app                        Home      Contacts          Phone             Browser              Other




Content providers encapsulate data                            Application Framework
that is shared (e.g. contacts)         Activity        Window                    Content                   View
                                       Manager         Manager                  Providers                 System

                                       Package    Telephony         Resource           Location            Notiication
Resource manager manages               Manager     Manager          Manager            Manager             Manager


everything that is not the code                                     Libraries
                                       Surface       Media
                                                                       SQLite                  Android Runtime
                                       Manager     Framework

Location manager figures out the                                                                     Core Libs

location of the phone (GPS, GSM,
                                       OpenGL      FreeType            WebKit

                                                                                                      Delvik

WiFi)                                    SGL          SSL               libc
                                                                                                       VM




Notification manager for events         Display
                                        Driver
                                                   Camera
                                                    Driver
                                                                  Linux Kernel              Flash
                                                                                            Driver
                                                                                                                 Binder
                                                                                                                 Driver

such as arriving messages,              Keypad      WiFi                                    Audio
                                                                                            Driver
                                                                                                                 Power
                                                                                                                 Mgmt
                                         Driver     Driver
appointments, etc
ApplicaXons	
  
Android	
  SDK	
  -­‐	
  What’s	
  in	
  the	
  box
                                                     	
  
SDK

Tools
Docs
Platforms
     Data
     Skins
     Images
     Samples
Add-ons
     Google Maps
The	
  Tools
           	
  
          Tools are important part of the
          SDK. They are available via
          Eclipse plugin as well as command
          line shell.
HELLO	
  WORLD!	
  
Create	
  New	
  Project
                                         	
  
Use the Eclipse tool to create a new
Android project.

Here are some key constructs:


Project	
          Eclipse	
  construct	
  
Target	
           minimum	
  to	
  run	
  
App	
  name	
      whatever	
  
Package	
          Java	
  package	
  
AcXvity	
          Java	
  class	
  
The	
  Manifest	
  File	
  
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
   package="com.marakana"
   android:versionCode="1"
   android:versionName="1.0">
  <application android:icon="@drawable/icon"
        android:label="@string/app_name">
    <activity android:name=".HelloAndroid"
           android:label="@string/app_name">
       <intent-filter>
          <action android:name="android.intent.action.MAIN" />
          <category android:name="android.intent.category.LAUNCHER" />
       </intent-filter>
    </activity>
  </application>
  <uses-sdk android:minSdkVersion="5" />
</manifest>
The	
  Layout	
  Resource	
  

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  >
<TextView
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:text="@string/hello"
  />
</LinearLayout>
The	
  Java	
  File	
  
package com.marakana;

import android.app.Activity;
import android.os.Bundle;

public class HelloAndroid extends Activity {
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.main);
  }
}
Running	
  on	
  Emulator
                        	
  
MAIN	
  BUILDING	
  BLOCKS	
  
AcXviXes
                       	
  
Activity is to an    Android Application

application what a       Main Activity
                                           Another    Another
                                           Activity   Activity
web page is to a
website. Sort of.
AcXvity	
  Lifecycle	
  
                                                         Starting




Activities have a well-
                                                     (1) onCreate()
                                                      (2) onStart()
                                              (3) onRestoreInstanceState()

defined lifecycle. The                              (4) onResume()


Android OS manages
your activity by                                         Running


changing its state.       (3) onResume()
                            (2) onStart()
                                                                               (1) onSaveInstanceState()
                                                                                     (2) onPause()

You fill in the blanks.
                           (1) onRestart()                    onResume()


                                                  (1) onSaveInstanceState()
                            Stopped                      (2) onStop()                     Paused



                                 onDestroy()
                                     or                                       <process killed>
                               <process killed>

                                                        Destroyed
Intents
                           	
  
Intents are to      Android Application
Android apps                                         Another
                        Main Activity     Intent
what hyperlinks                                      Activity

are to websites.
They can be




                                                        Intent
implicit and
                    Android Application
explicit. Sort of
like absolute and       Main Activity       Intent
                                                     Another
                                                     Activity
relative links.
Services
                           	
  
A service is something that can be started and
stopped. It doesn’t have UI. It is typically managed
by an activity. Music player,
for example
Service	
  Lifecycle	
  
Service also has a                                       Starting

lifecycle, but it’s                                                            (1) onCreate()
much simpler than                                                               (2) onStart()


activity’s. An activity                      onStart()

typically starts and
stops a service to do       Stopped                                                Running

some work for it in
the background.                                                     onStop()

Such as play music,
check for new               onDestroy()
                                or

tweets, etc.
                          <process killed>
                                                    Destroyed
Content	
  Providers
                               	
  
Content Providers share                    Content
content with applications                  Provider

across application           Content URI

boundaries.                    insert()

Examples of built-in          update()

Content Providers are:         delete()

Contacts, MediaStore,          query()

Settings and more.
Broadcast	
  Receivers
                                	
  




An Intent-based publish-subscribe mechanism. Great for listening
system events such as SMS messages.
ANDROID	
  USER	
  INTERFACE	
  
Two	
  UI	
  Approaches	
  
Procedural	
                              Declara?ve	
  
You	
  write	
  Java	
  code	
            You	
  write	
  XML	
  code	
  
Similar	
  to	
  Swing	
  or	
  AWT	
     Similar	
  to	
  HTML	
  of	
  a	
  web	
  page	
  




You can mix and match both styles.
Declarative is preferred: easier and
more tools
XML-­‐Based	
  User	
  Interface	
  




Use WYSIWYG tools to build powerful XML-based UI.
Easily customize it from Java. Separate concerns.
Dips	
  and	
  Sps	
  

px	
  (pixel)	
                                 Dots	
  on	
  the	
  screen	
  
in	
  (inches)	
                                Size	
  as	
  measured	
  by	
  a	
  ruler	
  
mm	
  (millimeters)	
                           Size	
  as	
  measured	
  by	
  a	
  ruler	
  
pt	
  (points)	
                                1/72	
  of	
  an	
  inch	
  
dp	
  (density-­‐independent	
  pixel)	
        Abstract	
  unit.	
  On	
  screen	
  with	
  160dpi,	
  
                                                1dp=1px	
  
dip	
                                           synonym	
  for	
  dp	
  and	
  oeen	
  used	
  by	
  Google	
  
sp	
                                            Similar	
  to	
  dp	
  but	
  also	
  scaled	
  by	
  users	
  font	
  
                                                size	
  preference	
  
Views	
  and	
  Layouts
                          	
  

                    ViewGroup




        ViewGroup               View




 View     View      View




ViewGroups contain other Views but
are also Views themselves.
Common	
  UI	
  Components
                                	
  
Android UI includes many
common modern UI
widgets, such as Buttons,
Tabs, Progress Bars, Date
and Time Pickers, etc.
SelecXon	
  Components
                              	
  

Some UI widgets may
be linked to zillions of
pieces of data.
Examples are ListView
and Spinners
(pull-downs).
Adapters
                         	
  


                      Adapter       Data
                                   Source




To make sure they run smoothly, Android uses
Adapters to connect them to their data sources. A
typical data source is an Array or a Database.
Complex	
  Components
                            	
  
Certain high-level components are simply
available just like Views. Adding a Map or a
Video to your application is almost like adding a
Button or a piece of text.
Menus	
  and	
  Dialogs
                      	
  
Graphics	
  &	
  AnimaXon	
  
Android has rich support for 2D graphics.
You can draw & animate from XML.
You can use OpenGL for 3D graphics.
MulXmedia	
  
AudioPlayer lets you simply specify
the audio resource and play it.

VideoView is a View that you can
drop anywhere in your activity, point
to a video file and play it.

XML:
<VideoView
  android:id="@+id/video"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:layout_gravity="center” />

Java:
player = (VideoView) findViewById(R.id.video);
player.setVideoPath("/sdcard/samplevideo.3gp");
player.start();
Google	
  Maps
                                      	
  
Google Maps is an add-on in Android.
It is not part of open-source project.

However, adding Maps is relatively
easy using MapView.


XML:
<com.google.android.maps.MapView
android:id="@+id/map"
android:clickable="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="0EfLSgdSCWIN…A"
/>
DEBUGGING	
  	
  
ANDROID	
  APPS	
  
LogCat
                              	
  
The universal, most
versatile way to track
what is going on in
your app.

Can be viewed via
command line or
Eclipse.

Logs can be
generated both from
SDK Java code, or
low-level C code via
Bionic libc extension.
Debugger
                                    	
  




Your standard debugger is included in SDK, with all the usual bells & whistles.
TraceView	
  




TraceView helps you profile you application and find bottlenecks. It shows
execution of various calls through the entire stack. You can zoom into specific
calls.
Hierarchy	
  Viewer
                                          	
  
Hierarchy Viewer helps
you analyze your User
Interface.

Base UI tends to be the
most “expensive” part of
your application, this tool
is very useful.
Summary	
  
     Android is based on Java.

     You write Java code, but technically
     don’t run it.

     Java is augmented with XML, mostly
     for UI purposes.

     Android Java is mostly based on Java
     SE with replacement UI libraries.


     Marko Gargenta, Marakana.com
     marko@marakana.com
     +1-415-647-7000


     Licensed under Creative Commons
     License (cc-by-nc-nd). Please Share!

Weitere ähnliche Inhalte

Was ist angesagt?

An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To AndroidGoogleTecTalks
 
Android Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar GargentaAndroid Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar GargentaMarakana Inc.
 
Introduction To Android
Introduction To AndroidIntroduction To Android
Introduction To Androidma-polimi
 
The anatomy and philosophy of Android - Google I/O 2009
The anatomy and philosophy of Android - Google I/O 2009The anatomy and philosophy of Android - Google I/O 2009
The anatomy and philosophy of Android - Google I/O 2009Viswanath J
 
Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11영호 라
 
Codendi Datasheet
Codendi DatasheetCodendi Datasheet
Codendi DatasheetCodendi
 
Android unveiled (I)
Android unveiled (I)Android unveiled (I)
Android unveiled (I)denian00
 
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012CloudBees
 
Systems Resource Management with NetIQ AppManager
Systems Resource Management with NetIQ AppManagerSystems Resource Management with NetIQ AppManager
Systems Resource Management with NetIQ AppManagerAdvanced Logic Industries
 
Android : How Do I Code Thee?
Android : How Do I Code Thee?Android : How Do I Code Thee?
Android : How Do I Code Thee?Viswanath J
 
Google Android Naver 1212
Google Android Naver 1212Google Android Naver 1212
Google Android Naver 1212Yoojoo Jang
 
Android Beyond The Phone
Android Beyond The PhoneAndroid Beyond The Phone
Android Beyond The PhoneMarko Gargenta
 
Open Source Licenses and Tools
Open Source Licenses and ToolsOpen Source Licenses and Tools
Open Source Licenses and Toolsg2ix
 
Android architecture
Android architectureAndroid architecture
Android architectureHari Krishna
 
Nwdi Overview And Features
Nwdi Overview And FeaturesNwdi Overview And Features
Nwdi Overview And Featuresakrishnanr
 
Mee go是您的新机遇
Mee go是您的新机遇Mee go是您的新机遇
Mee go是您的新机遇OpenSourceCamp
 
Eclipse vs Netbean vs Railo
Eclipse vs Netbean vs RailoEclipse vs Netbean vs Railo
Eclipse vs Netbean vs RailoMohd Safian
 

Was ist angesagt? (20)

Android Internals
Android InternalsAndroid Internals
Android Internals
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
Android Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar GargentaAndroid Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar Gargenta
 
Introduction To Android
Introduction To AndroidIntroduction To Android
Introduction To Android
 
The anatomy and philosophy of Android - Google I/O 2009
The anatomy and philosophy of Android - Google I/O 2009The anatomy and philosophy of Android - Google I/O 2009
The anatomy and philosophy of Android - Google I/O 2009
 
Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11
 
Codendi Datasheet
Codendi DatasheetCodendi Datasheet
Codendi Datasheet
 
Android unveiled (I)
Android unveiled (I)Android unveiled (I)
Android unveiled (I)
 
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
 
Systems Resource Management with NetIQ AppManager
Systems Resource Management with NetIQ AppManagerSystems Resource Management with NetIQ AppManager
Systems Resource Management with NetIQ AppManager
 
Android : How Do I Code Thee?
Android : How Do I Code Thee?Android : How Do I Code Thee?
Android : How Do I Code Thee?
 
Google Android Naver 1212
Google Android Naver 1212Google Android Naver 1212
Google Android Naver 1212
 
Android Beyond The Phone
Android Beyond The PhoneAndroid Beyond The Phone
Android Beyond The Phone
 
Open Source Licenses and Tools
Open Source Licenses and ToolsOpen Source Licenses and Tools
Open Source Licenses and Tools
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Nwdi Overview And Features
Nwdi Overview And FeaturesNwdi Overview And Features
Nwdi Overview And Features
 
Mee go是您的新机遇
Mee go是您的新机遇Mee go是您的新机遇
Mee go是您的新机遇
 
ARM
ARMARM
ARM
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Eclipse vs Netbean vs Railo
Eclipse vs Netbean vs RailoEclipse vs Netbean vs Railo
Eclipse vs Netbean vs Railo
 

Andere mochten auch

Survey Monkey Survey Results
Survey Monkey   Survey ResultsSurvey Monkey   Survey Results
Survey Monkey Survey ResultsStephanie White
 
Hand Painted Presentation
Hand Painted PresentationHand Painted Presentation
Hand Painted Presentationkausarh
 
Copia De Loba
Copia De LobaCopia De Loba
Copia De Lobaamezola
 
Reinforcement unit 7
Reinforcement unit 7Reinforcement unit 7
Reinforcement unit 7Sonia
 
Wellspiration 3: Burning Fat
Wellspiration 3: Burning FatWellspiration 3: Burning Fat
Wellspiration 3: Burning FatYafa Sakkejha
 
Reinforcement 1
Reinforcement 1Reinforcement 1
Reinforcement 1Sonia
 
More practice
More practiceMore practice
More practiceSonia
 
Fot Net Data Seminar Benmimoun, IKA
Fot Net Data Seminar Benmimoun, IKAFot Net Data Seminar Benmimoun, IKA
Fot Net Data Seminar Benmimoun, IKAeuroFOT
 
#fotocasaResponde: ¿Cómo reclamar la devolución de las cláusulas suelo?
#fotocasaResponde: ¿Cómo reclamar la devolución de las cláusulas suelo?#fotocasaResponde: ¿Cómo reclamar la devolución de las cláusulas suelo?
#fotocasaResponde: ¿Cómo reclamar la devolución de las cláusulas suelo?fotocasa
 
Lasefiche Products Family Presentation
Lasefiche Products Family PresentationLasefiche Products Family Presentation
Lasefiche Products Family Presentationrobnjoro
 
Employer branding - valg av arbeidsgiver og effektiv omdømmebygging
Employer branding - valg av arbeidsgiver og effektiv omdømmebyggingEmployer branding - valg av arbeidsgiver og effektiv omdømmebygging
Employer branding - valg av arbeidsgiver og effektiv omdømmebyggingArve Kvalsvik
 
Unit 2. reinforcement
Unit 2. reinforcementUnit 2. reinforcement
Unit 2. reinforcementSonia
 

Andere mochten auch (20)

Comenius italian
Comenius italianComenius italian
Comenius italian
 
Survey Monkey Survey Results
Survey Monkey   Survey ResultsSurvey Monkey   Survey Results
Survey Monkey Survey Results
 
Hand Painted Presentation
Hand Painted PresentationHand Painted Presentation
Hand Painted Presentation
 
Languages test
Languages testLanguages test
Languages test
 
Copia De Loba
Copia De LobaCopia De Loba
Copia De Loba
 
Radiant
RadiantRadiant
Radiant
 
Seeing Red Cars
Seeing Red CarsSeeing Red Cars
Seeing Red Cars
 
Reinforcement unit 7
Reinforcement unit 7Reinforcement unit 7
Reinforcement unit 7
 
Wellspiration 3: Burning Fat
Wellspiration 3: Burning FatWellspiration 3: Burning Fat
Wellspiration 3: Burning Fat
 
Shakira
ShakiraShakira
Shakira
 
Reinforcement 1
Reinforcement 1Reinforcement 1
Reinforcement 1
 
More practice
More practiceMore practice
More practice
 
Fot Net Data Seminar Benmimoun, IKA
Fot Net Data Seminar Benmimoun, IKAFot Net Data Seminar Benmimoun, IKA
Fot Net Data Seminar Benmimoun, IKA
 
Photo of the day
Photo of the dayPhoto of the day
Photo of the day
 
#fotocasaResponde: ¿Cómo reclamar la devolución de las cláusulas suelo?
#fotocasaResponde: ¿Cómo reclamar la devolución de las cláusulas suelo?#fotocasaResponde: ¿Cómo reclamar la devolución de las cláusulas suelo?
#fotocasaResponde: ¿Cómo reclamar la devolución de las cláusulas suelo?
 
Workshop fanfulla "Creative Loverz"
Workshop fanfulla "Creative Loverz"Workshop fanfulla "Creative Loverz"
Workshop fanfulla "Creative Loverz"
 
Ghetto Workout
Ghetto WorkoutGhetto Workout
Ghetto Workout
 
Lasefiche Products Family Presentation
Lasefiche Products Family PresentationLasefiche Products Family Presentation
Lasefiche Products Family Presentation
 
Employer branding - valg av arbeidsgiver og effektiv omdømmebygging
Employer branding - valg av arbeidsgiver og effektiv omdømmebyggingEmployer branding - valg av arbeidsgiver og effektiv omdømmebygging
Employer branding - valg av arbeidsgiver og effektiv omdømmebygging
 
Unit 2. reinforcement
Unit 2. reinforcementUnit 2. reinforcement
Unit 2. reinforcement
 

Ähnlich wie Android: A 9,000-foot Overview

Google Io Introduction To Android
Google Io Introduction To AndroidGoogle Io Introduction To Android
Google Io Introduction To AndroidBhavya Siddappa
 
Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Doug Hawkins
 
Android application development
Android application developmentAndroid application development
Android application developmentLinh Vi Tường
 
Multithreading in Android
Multithreading in AndroidMultithreading in Android
Multithreading in Androidcoolmirza143
 
Introduction to Android platform
Introduction to Android platformIntroduction to Android platform
Introduction to Android platformmaamir farooq
 
Webinar The App Lifecycle Platform
Webinar The App Lifecycle PlatformWebinar The App Lifecycle Platform
Webinar The App Lifecycle PlatformService2Media
 
Soa204 Kawasaki Final
Soa204 Kawasaki FinalSoa204 Kawasaki Final
Soa204 Kawasaki FinalAnush Kumar
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21dxsaki
 
Lecture slides introduction_introduction
Lecture slides introduction_introductionLecture slides introduction_introduction
Lecture slides introduction_introductionBadr Benali
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Agora Group
 
2011 android
2011 android2011 android
2011 androidvpedapolu
 
Microsoft and Open Source Interoperability
Microsoft and Open Source InteroperabilityMicrosoft and Open Source Interoperability
Microsoft and Open Source Interoperabilityguest82d216
 
Windows Phone 7.5 와 Windows 8 메트로 스타일 앱 개발
Windows Phone 7.5  와 Windows 8 메트로 스타일 앱 개발Windows Phone 7.5  와 Windows 8 메트로 스타일 앱 개발
Windows Phone 7.5 와 Windows 8 메트로 스타일 앱 개발Seo Jinho
 
Cross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San FranciscoCross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San FranciscoCA API Management
 
Android Anatomy google io 2008
Android Anatomy google io 2008Android Anatomy google io 2008
Android Anatomy google io 2008Trinh Duy Hung
 
How to Choose the Right API Management Solution
How to Choose the Right API Management SolutionHow to Choose the Right API Management Solution
How to Choose the Right API Management SolutionCA API Management
 

Ähnlich wie Android: A 9,000-foot Overview (20)

Google Io Introduction To Android
Google Io Introduction To AndroidGoogle Io Introduction To Android
Google Io Introduction To Android
 
Android and Intel Inside
Android and Intel InsideAndroid and Intel Inside
Android and Intel Inside
 
Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011
 
Android application development
Android application developmentAndroid application development
Android application development
 
Multithreading in Android
Multithreading in AndroidMultithreading in Android
Multithreading in Android
 
Introduction to Android platform
Introduction to Android platformIntroduction to Android platform
Introduction to Android platform
 
Webinar The App Lifecycle Platform
Webinar The App Lifecycle PlatformWebinar The App Lifecycle Platform
Webinar The App Lifecycle Platform
 
Soa204 Kawasaki Final
Soa204 Kawasaki FinalSoa204 Kawasaki Final
Soa204 Kawasaki Final
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21
 
Lecture slides introduction_introduction
Lecture slides introduction_introductionLecture slides introduction_introduction
Lecture slides introduction_introduction
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012
 
2011 android
2011 android2011 android
2011 android
 
Improve Android System Component Performance
Improve Android System Component PerformanceImprove Android System Component Performance
Improve Android System Component Performance
 
Microsoft and Open Source Interoperability
Microsoft and Open Source InteroperabilityMicrosoft and Open Source Interoperability
Microsoft and Open Source Interoperability
 
Windows Phone 7.5 와 Windows 8 메트로 스타일 앱 개발
Windows Phone 7.5  와 Windows 8 메트로 스타일 앱 개발Windows Phone 7.5  와 Windows 8 메트로 스타일 앱 개발
Windows Phone 7.5 와 Windows 8 메트로 스타일 앱 개발
 
Cross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San FranciscoCross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San Francisco
 
Android Anatomy google io 2008
Android Anatomy google io 2008Android Anatomy google io 2008
Android Anatomy google io 2008
 
Android OS
Android OSAndroid OS
Android OS
 
How to Choose the Right API Management Solution
How to Choose the Right API Management SolutionHow to Choose the Right API Management Solution
How to Choose the Right API Management Solution
 
Android architecture
Android architectureAndroid architecture
Android architecture
 

Mehr von Marko Gargenta

LTE: Building New Killer Apps
LTE: Building New Killer AppsLTE: Building New Killer Apps
LTE: Building New Killer AppsMarko Gargenta
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User InterfaceMarko Gargenta
 
Marakana android-java developers
Marakana android-java developersMarakana android-java developers
Marakana android-java developersMarko Gargenta
 
Why Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, MarakanaWhy Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, MarakanaMarko Gargenta
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardMarko Gargenta
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardMarko Gargenta
 

Mehr von Marko Gargenta (8)

LTE: Building New Killer Apps
LTE: Building New Killer AppsLTE: Building New Killer Apps
LTE: Building New Killer Apps
 
Java Champion Wanted
Java Champion WantedJava Champion Wanted
Java Champion Wanted
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
 
Marakana android-java developers
Marakana android-java developersMarakana android-java developers
Marakana android-java developers
 
Scrum Overview
Scrum OverviewScrum Overview
Scrum Overview
 
Why Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, MarakanaWhy Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, Marakana
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So Hard
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So Hard
 

Kürzlich hochgeladen

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Kürzlich hochgeladen (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

Android: A 9,000-foot Overview

  • 1. Android:     A  9,000-­‐foot   Overview   Marko  Gargenta   Marakana  
  • 2. Agenda   •  Android  History   •  Android  and  Java   •  The  Stack   •  Android  SDK   •  Hello  World!   •  Main  Building  Blocks   •  Android  User  Interface   •  Debugging   •  Summary  
  • 3. History   2005   Google  buys  Android,  Inc.   Work  on  Dalvik  starts   2007   OHA  Announced   Early  SDK   2008   G1  Announced   SDK  1.0  Released   2009   G2  Released   Cupcake,  Donut,  Eclair  
  • 4. Android  and  Java   Android Java = Java SE – AWT/Swing + Android API
  • 7. Linux  Kernel   Android runs on Linux. Applications Home Contacts Phone Browser Other Linux provides as well as: Hardware abstraction layer Application Framework Memory management Activity Window Content View Process management Manager Manager Providers System Package Telephony Resource Location Notiication Networking Manager Manager Manager Manager Manager Libraries Users never see Linux sub system Surface Media SQLite Android Runtime Manager Framework Core Libs The adb shell command opens OpenGL FreeType WebKit Delvik Linux shell SGL SSL libc VM Display Camera Linux Kernel Flash Binder Driver Driver Driver Driver Keypad WiFi Audio Power Driver Driver Driver Mgmt
  • 8. NaXve  Libraries   Bionic, a super fast and small Applications GPL-based libc library optimized Home Contacts Phone Browser Other for embedded use Application Framework Surface Manager for composing Activity Window Content View window manager with off-screen Manager Manager Providers System buffering Package Telephony Resource Location Notiication Manager Manager Manager Manager Manager Libraries 2D and 3D graphics hardware Surface Media SQLite Android Runtime support or software simulation Manager Framework Core Libs OpenGL FreeType WebKit Delvik Media codecs offer support for SGL SSL libc VM major audio/video codecs Display Camera Linux Kernel Flash Binder Driver Driver SQLite database Driver Driver Keypad WiFi Audio Power Driver Driver Driver Mgmt WebKit library for fast HTML rendering
  • 9. Dalvik   Dalvik VM is Google’s implementation of Java Optimized for mobile devices Key Dalvik differences: Register-based versus stack-based VM Dalvik runs .dex files More efficient and compact implementation Different set of Java libraries than SDK
  • 10. ApplicaXon  Framework   Activation manager controls the life Applications cycle of the app Home Contacts Phone Browser Other Content providers encapsulate data Application Framework that is shared (e.g. contacts) Activity Window Content View Manager Manager Providers System Package Telephony Resource Location Notiication Resource manager manages Manager Manager Manager Manager Manager everything that is not the code Libraries Surface Media SQLite Android Runtime Manager Framework Location manager figures out the Core Libs location of the phone (GPS, GSM, OpenGL FreeType WebKit Delvik WiFi) SGL SSL libc VM Notification manager for events Display Driver Camera Driver Linux Kernel Flash Driver Binder Driver such as arriving messages, Keypad WiFi Audio Driver Power Mgmt Driver Driver appointments, etc
  • 12. Android  SDK  -­‐  What’s  in  the  box   SDK Tools Docs Platforms Data Skins Images Samples Add-ons Google Maps
  • 13. The  Tools   Tools are important part of the SDK. They are available via Eclipse plugin as well as command line shell.
  • 15. Create  New  Project   Use the Eclipse tool to create a new Android project. Here are some key constructs: Project   Eclipse  construct   Target   minimum  to  run   App  name   whatever   Package   Java  package   AcXvity   Java  class  
  • 16. The  Manifest  File   <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.marakana" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".HelloAndroid" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <uses-sdk android:minSdkVersion="5" /> </manifest>
  • 17. The  Layout  Resource   <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> </LinearLayout>
  • 18. The  Java  File   package com.marakana; import android.app.Activity; import android.os.Bundle; public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } }
  • 21. AcXviXes   Activity is to an Android Application application what a Main Activity Another Another Activity Activity web page is to a website. Sort of.
  • 22. AcXvity  Lifecycle   Starting Activities have a well- (1) onCreate() (2) onStart() (3) onRestoreInstanceState() defined lifecycle. The (4) onResume() Android OS manages your activity by Running changing its state. (3) onResume() (2) onStart() (1) onSaveInstanceState() (2) onPause() You fill in the blanks. (1) onRestart() onResume() (1) onSaveInstanceState() Stopped (2) onStop() Paused onDestroy() or <process killed> <process killed> Destroyed
  • 23. Intents   Intents are to Android Application Android apps Another Main Activity Intent what hyperlinks Activity are to websites. They can be Intent implicit and Android Application explicit. Sort of like absolute and Main Activity Intent Another Activity relative links.
  • 24. Services   A service is something that can be started and stopped. It doesn’t have UI. It is typically managed by an activity. Music player, for example
  • 25. Service  Lifecycle   Service also has a Starting lifecycle, but it’s (1) onCreate() much simpler than (2) onStart() activity’s. An activity onStart() typically starts and stops a service to do Stopped Running some work for it in the background. onStop() Such as play music, check for new onDestroy() or tweets, etc. <process killed> Destroyed
  • 26. Content  Providers   Content Providers share Content content with applications Provider across application Content URI boundaries. insert() Examples of built-in update() Content Providers are: delete() Contacts, MediaStore, query() Settings and more.
  • 27. Broadcast  Receivers   An Intent-based publish-subscribe mechanism. Great for listening system events such as SMS messages.
  • 29. Two  UI  Approaches   Procedural   Declara?ve   You  write  Java  code   You  write  XML  code   Similar  to  Swing  or  AWT   Similar  to  HTML  of  a  web  page   You can mix and match both styles. Declarative is preferred: easier and more tools
  • 30. XML-­‐Based  User  Interface   Use WYSIWYG tools to build powerful XML-based UI. Easily customize it from Java. Separate concerns.
  • 31. Dips  and  Sps   px  (pixel)   Dots  on  the  screen   in  (inches)   Size  as  measured  by  a  ruler   mm  (millimeters)   Size  as  measured  by  a  ruler   pt  (points)   1/72  of  an  inch   dp  (density-­‐independent  pixel)   Abstract  unit.  On  screen  with  160dpi,   1dp=1px   dip   synonym  for  dp  and  oeen  used  by  Google   sp   Similar  to  dp  but  also  scaled  by  users  font   size  preference  
  • 32. Views  and  Layouts   ViewGroup ViewGroup View View View View ViewGroups contain other Views but are also Views themselves.
  • 33. Common  UI  Components   Android UI includes many common modern UI widgets, such as Buttons, Tabs, Progress Bars, Date and Time Pickers, etc.
  • 34. SelecXon  Components   Some UI widgets may be linked to zillions of pieces of data. Examples are ListView and Spinners (pull-downs).
  • 35. Adapters   Adapter Data Source To make sure they run smoothly, Android uses Adapters to connect them to their data sources. A typical data source is an Array or a Database.
  • 36. Complex  Components   Certain high-level components are simply available just like Views. Adding a Map or a Video to your application is almost like adding a Button or a piece of text.
  • 38. Graphics  &  AnimaXon   Android has rich support for 2D graphics. You can draw & animate from XML. You can use OpenGL for 3D graphics.
  • 39. MulXmedia   AudioPlayer lets you simply specify the audio resource and play it. VideoView is a View that you can drop anywhere in your activity, point to a video file and play it. XML: <VideoView android:id="@+id/video" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center” /> Java: player = (VideoView) findViewById(R.id.video); player.setVideoPath("/sdcard/samplevideo.3gp"); player.start();
  • 40. Google  Maps   Google Maps is an add-on in Android. It is not part of open-source project. However, adding Maps is relatively easy using MapView. XML: <com.google.android.maps.MapView android:id="@+id/map" android:clickable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:apiKey="0EfLSgdSCWIN…A" />
  • 42. LogCat   The universal, most versatile way to track what is going on in your app. Can be viewed via command line or Eclipse. Logs can be generated both from SDK Java code, or low-level C code via Bionic libc extension.
  • 43. Debugger   Your standard debugger is included in SDK, with all the usual bells & whistles.
  • 44. TraceView   TraceView helps you profile you application and find bottlenecks. It shows execution of various calls through the entire stack. You can zoom into specific calls.
  • 45. Hierarchy  Viewer   Hierarchy Viewer helps you analyze your User Interface. Base UI tends to be the most “expensive” part of your application, this tool is very useful.
  • 46. Summary   Android is based on Java. You write Java code, but technically don’t run it. Java is augmented with XML, mostly for UI purposes. Android Java is mostly based on Java SE with replacement UI libraries. Marko Gargenta, Marakana.com marko@marakana.com +1-415-647-7000 Licensed under Creative Commons License (cc-by-nc-nd). Please Share!