SlideShare ist ein Scribd-Unternehmen logo
1 von 52
Downloaden Sie, um offline zu lesen
Android	
  
Overview	
  For	
  
 Managers	
  

 Marko	
  Gargenta	
  
   Marakana	
  
ANDROID	
  HISTORY	
  
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	
  
Java EE
                             Java Source
   Java SE                      Code

                                Java
          Java ME              Compiler
            CDC
              Java ME         Java Byte
               CLDC             Code

                                 Dex
                               Compiler


                              Dalvik Byte
                                Code
Android	
  Versus	
  Java	
  ME	
  
Just one type of device – no CDC/CLDC

Easier to understand – no MIDlets, Xlets, AWT

Responsive – Dalvik vs. one–size-fits-all JVM

Java (in)compatibility

Adoption
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
NaSve	
  Libraries	
  
Native C libraries provide many of                              Applications


key Android services, such as:        Home      Contacts          Phone             Browser              Other




Surface Manager, for composing                              Application Framework
window manager with off-screen       Activity        Window                    Content                   View

buffering                            Manager         Manager                  Providers                 System

                                     Package    Telephony         Resource           Location            Notiication
                                     Manager     Manager          Manager            Manager             Manager

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

                                                                                                   Core Libs

Media codecs offer support for       OpenGL      FreeType            WebKit

                                                                                                    Delvik
major audio/video codecs               SGL          SSL               libc
                                                                                                     VM




SQLite database                       Display    Camera         Linux Kernel              Flash                Binder
                                      Driver      Driver                                  Driver               Driver

                                      Keypad      WiFi                                    Audio                Power

WebKit library for fast HTML           Driver     Driver                                  Driver               Mgmt


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
ApplicaSon	
  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
ApplicaSons	
  
Android	
  SDK	
  -­‐	
  What’s	
  in	
  the	
  box
                                                     	
  
SDK

Tools
Docs
Platforms
     Data
     Skins
     Images
     Samples
Add-ons
     Google Maps
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	
  
AcSvity	
          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	
  
AcSviSes
                       	
  
Activity is to an    Android Application

application what a       Main Activity
                                           Another    Another
                                           Activity   Activity
web page is to a
website. Sort of.
AcSvity	
  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.
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	
  oden	
  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.
SelecSon	
  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.
Building	
  UI	
  for	
  Performance	
  




A handy Hierarchy Viewer tool helps with optimizing the UI for performance
Menus	
  and	
  Dialogs
                      	
  
Graphics	
  &	
  AnimaSon	
  
Android has rich support for 2D graphics.
You can draw & animate from XML.
You can use OpenGL for 3D graphics.
OPERATING	
  SYSTEM	
  FEATURES	
  	
  
File	
  System	
  
The file system has three main mount points. One
for system, one for the apps, and one for whatever.

Each app has its own sandbox easily accessible to
it. No one else can access its data. The sandbox is
in /data/data/com.marakana/

SDCard is expected to always be there. It’s a good
place for large files, such as movies and music.
Everyone can access it.
Preferences
                                   	
  

Your app can support complex
preferences quite easily.

You define your preferences in an
XML file and the corresponding UI and
data storage is done for free.
NoSficaSons
                                    	
  


Notifications are useful for
applications to notify user of things
going on in the background.

Notifications are implemented via
Notification Manager.
Security	
  
Each Android application            Android Application
runs inside its own Linux
process.                                     Linux Process
Additionally, each application
has its own sandbox file                                   File
system with its own set of                     Prefs
                                       DB                 System
preferences and its own
database.

Other applications cannot
access any of its data,
unless it is explicitly shared.
SQLite	
  Database	
  
Android ships with SQLite3

SQLite is

Zero configuration
Serverless
Single database file
Cross-Platform
Compact
Public Domain

Database engine.


            May you do good and not evil
            May you find forgiveness for yourself and forgive others
            May you share freely, never taking more than you give.
MulSmedia	
  
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();
Sensors
                                    	
  
Android supports many built-in
sensors. You simply register with
Sensor Manager to get notifications
when sensor data changes.

Sensors are erratic and data comes
in uneven intervals.

Emulator doesn’t have good support
for sensors.
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"
/>
WORKING	
  WITH	
  HARDWARE	
  
Camera	
  
Android SDK supports access to
built-in Camera and its preview.

You can access real-time frames,
or get a callback when shutter is
open. The photo data is passed
back in either raw or jpeg format.
WiFi
                                      	
  
WiFi API allows for managing your
connection, scanning for active WiFi
points and find out details about each.
Telephony
                                     	
  
With Telephony API, you can:

Make phone calls
Monitor phone state and activity
Access phone properties and status
Monitor data connectivity
Control the phone

It is a simple yet powerful API
Summary	
  
     Android is open
     Android is simple
     Android is complete
     Android has apps
     Android uses Java

     Geeks love Android
     OEMs love Android
     Operators like Android

     Android UI is not as sexy
     Android doesn’t have as many apps
     Android doesn’t have THE phone
     Yet.

Weitere ähnliche Inhalte

Was ist angesagt?

An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To AndroidGoogleTecTalks
 
Android Beyond The Phone
Android Beyond The PhoneAndroid Beyond The Phone
Android Beyond The PhoneMarko Gargenta
 
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.
 
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
 
Introduction To Android
Introduction To AndroidIntroduction To Android
Introduction To Androidma-polimi
 
Droid con berlin_the_bb10_android_runtime
Droid con berlin_the_bb10_android_runtimeDroid con berlin_the_bb10_android_runtime
Droid con berlin_the_bb10_android_runtimeDroidcon Berlin
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21dxsaki
 
Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11영호 라
 
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 architecture
Android architectureAndroid architecture
Android architectureHari Krishna
 
Android unveiled (I)
Android unveiled (I)Android unveiled (I)
Android unveiled (I)denian00
 
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
 
Webinar The App Lifecycle Platform
Webinar The App Lifecycle PlatformWebinar The App Lifecycle Platform
Webinar The App Lifecycle PlatformService2Media
 
Open Source Licenses and Tools
Open Source Licenses and ToolsOpen Source Licenses and Tools
Open Source Licenses and Toolsg2ix
 
Droid con 2012 bangalore v2.0
Droid con 2012   bangalore v2.0Droid con 2012   bangalore v2.0
Droid con 2012 bangalore v2.0Premchander Rao
 
Develop Ruby Applications Fast | TubroRuby
Develop Ruby Applications Fast | TubroRubyDevelop Ruby Applications Fast | TubroRuby
Develop Ruby Applications Fast | TubroRubyMichael Findling
 
Mee go是您的新机遇
Mee go是您的新机遇Mee go是您的新机遇
Mee go是您的新机遇OpenSourceCamp
 

Was ist angesagt? (19)

Android Internals
Android InternalsAndroid Internals
Android Internals
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
Android Beyond The Phone
Android Beyond The PhoneAndroid Beyond The Phone
Android Beyond The Phone
 
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
 
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
 
Introduction To Android
Introduction To AndroidIntroduction To Android
Introduction To Android
 
Droid con berlin_the_bb10_android_runtime
Droid con berlin_the_bb10_android_runtimeDroid con berlin_the_bb10_android_runtime
Droid con berlin_the_bb10_android_runtime
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21
 
Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11
 
Systems Resource Management with NetIQ AppManager
Systems Resource Management with NetIQ AppManagerSystems Resource Management with NetIQ AppManager
Systems Resource Management with NetIQ AppManager
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Android unveiled (I)
Android unveiled (I)Android unveiled (I)
Android unveiled (I)
 
Android : How Do I Code Thee?
Android : How Do I Code Thee?Android : How Do I Code Thee?
Android : How Do I Code Thee?
 
Webinar The App Lifecycle Platform
Webinar The App Lifecycle PlatformWebinar The App Lifecycle Platform
Webinar The App Lifecycle Platform
 
Open Source Licenses and Tools
Open Source Licenses and ToolsOpen Source Licenses and Tools
Open Source Licenses and Tools
 
Droid con 2012 bangalore v2.0
Droid con 2012   bangalore v2.0Droid con 2012   bangalore v2.0
Droid con 2012 bangalore v2.0
 
Develop Ruby Applications Fast | TubroRuby
Develop Ruby Applications Fast | TubroRubyDevelop Ruby Applications Fast | TubroRuby
Develop Ruby Applications Fast | TubroRuby
 
Mee go是您的新机遇
Mee go是您的新机遇Mee go是您的新机遇
Mee go是您的新机遇
 
ARM
ARMARM
ARM
 

Andere mochten auch

Discover your Microsoft Learning certification pathway
Discover your Microsoft Learning certification pathwayDiscover your Microsoft Learning certification pathway
Discover your Microsoft Learning certification pathwayMicrosoft Learning
 
Iii jal pres_avaluaciocompetencial
Iii jal pres_avaluaciocompetencialIii jal pres_avaluaciocompetencial
Iii jal pres_avaluaciocompetencialArnau Cerdà
 
CinestudiO Cine Prêmio 2010 - Parte 1/4
CinestudiO Cine Prêmio 2010 - Parte 1/4CinestudiO Cine Prêmio 2010 - Parte 1/4
CinestudiO Cine Prêmio 2010 - Parte 1/4blog Cinestudio
 
Meeting Change Game
Meeting Change GameMeeting Change Game
Meeting Change GamePaul Boos
 
96 The Esplanade
96 The Esplanade96 The Esplanade
96 The Esplanaderobventer
 
Derecho métodos filosofía_musa_majad
Derecho métodos filosofía_musa_majadDerecho métodos filosofía_musa_majad
Derecho métodos filosofía_musa_majadMusa Majad
 
mobipoll @ РИФ+КИБ
mobipoll @ РИФ+КИБmobipoll @ РИФ+КИБ
mobipoll @ РИФ+КИБAnton Kuchumov
 
Agile antipatterns (Odessa, Vinnitsa)
Agile antipatterns (Odessa, Vinnitsa)Agile antipatterns (Odessa, Vinnitsa)
Agile antipatterns (Odessa, Vinnitsa)Yuriy Silvestrov
 
Come sviluppare un progetto completo - lez 4 (cross-media, storytelling)
Come sviluppare un progetto completo - lez 4 (cross-media, storytelling)Come sviluppare un progetto completo - lez 4 (cross-media, storytelling)
Come sviluppare un progetto completo - lez 4 (cross-media, storytelling)Artlandis' Webinar & Workshop
 
Unit 2. extra practice
Unit 2. extra practiceUnit 2. extra practice
Unit 2. extra practiceSonia
 
Intro Ppt
Intro PptIntro Ppt
Intro PptMausom
 

Andere mochten auch (20)

Exceptional Service, Exceptional Profit
Exceptional Service, Exceptional ProfitExceptional Service, Exceptional Profit
Exceptional Service, Exceptional Profit
 
structural_elements
structural_elementsstructural_elements
structural_elements
 
Discover your Microsoft Learning certification pathway
Discover your Microsoft Learning certification pathwayDiscover your Microsoft Learning certification pathway
Discover your Microsoft Learning certification pathway
 
Iii jal pres_avaluaciocompetencial
Iii jal pres_avaluaciocompetencialIii jal pres_avaluaciocompetencial
Iii jal pres_avaluaciocompetencial
 
CinestudiO Cine Prêmio 2010 - Parte 1/4
CinestudiO Cine Prêmio 2010 - Parte 1/4CinestudiO Cine Prêmio 2010 - Parte 1/4
CinestudiO Cine Prêmio 2010 - Parte 1/4
 
S.M.A.R.T. фитнес Konev Sergey
S.M.A.R.T. фитнес Konev SergeyS.M.A.R.T. фитнес Konev Sergey
S.M.A.R.T. фитнес Konev Sergey
 
Meeting Change Game
Meeting Change GameMeeting Change Game
Meeting Change Game
 
96 The Esplanade
96 The Esplanade96 The Esplanade
96 The Esplanade
 
2011 some photos
2011 some photos2011 some photos
2011 some photos
 
Save antarctica
Save antarcticaSave antarctica
Save antarctica
 
Derecho métodos filosofía_musa_majad
Derecho métodos filosofía_musa_majadDerecho métodos filosofía_musa_majad
Derecho métodos filosofía_musa_majad
 
mobipoll @ РИФ+КИБ
mobipoll @ РИФ+КИБmobipoll @ РИФ+КИБ
mobipoll @ РИФ+КИБ
 
Design considerations for the 25m Nigeria radio telescope by Edward Omowa.
Design considerations for the 25m Nigeria radio telescope by Edward Omowa.Design considerations for the 25m Nigeria radio telescope by Edward Omowa.
Design considerations for the 25m Nigeria radio telescope by Edward Omowa.
 
Agile antipatterns (Odessa, Vinnitsa)
Agile antipatterns (Odessa, Vinnitsa)Agile antipatterns (Odessa, Vinnitsa)
Agile antipatterns (Odessa, Vinnitsa)
 
Pálava, 30.4.2015
Pálava, 30.4.2015Pálava, 30.4.2015
Pálava, 30.4.2015
 
Social Media Mktg: road to perfection [infographic]
Social Media Mktg: road to perfection [infographic]Social Media Mktg: road to perfection [infographic]
Social Media Mktg: road to perfection [infographic]
 
Come sviluppare un progetto completo - lez 4 (cross-media, storytelling)
Come sviluppare un progetto completo - lez 4 (cross-media, storytelling)Come sviluppare un progetto completo - lez 4 (cross-media, storytelling)
Come sviluppare un progetto completo - lez 4 (cross-media, storytelling)
 
Unit 2. extra practice
Unit 2. extra practiceUnit 2. extra practice
Unit 2. extra practice
 
Intro Ppt
Intro PptIntro Ppt
Intro Ppt
 
itgrammar.pptx
itgrammar.pptxitgrammar.pptx
itgrammar.pptx
 

Ähnlich wie Android For Managers Slides

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
 
Introduction to Android platform
Introduction to Android platformIntroduction to Android platform
Introduction to Android platformmaamir farooq
 
Multithreading in Android
Multithreading in AndroidMultithreading in Android
Multithreading in Androidcoolmirza143
 
Lecture slides introduction_introduction
Lecture slides introduction_introductionLecture slides introduction_introduction
Lecture slides introduction_introductionBadr Benali
 
2011 android
2011 android2011 android
2011 androidvpedapolu
 
Google Android Naver 1212
Google Android Naver 1212Google Android Naver 1212
Google Android Naver 1212Yoojoo Jang
 
Android application development
Android application developmentAndroid application development
Android application developmentLinh Vi Tường
 
Soa204 Kawasaki Final
Soa204 Kawasaki FinalSoa204 Kawasaki Final
Soa204 Kawasaki FinalAnush Kumar
 
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
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Agora Group
 
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
 
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
 

Ähnlich wie Android For Managers Slides (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
 
Introduction to Android platform
Introduction to Android platformIntroduction to Android platform
Introduction to Android platform
 
Multithreading in Android
Multithreading in AndroidMultithreading in Android
Multithreading in Android
 
Lecture slides introduction_introduction
Lecture slides introduction_introductionLecture slides introduction_introduction
Lecture slides introduction_introduction
 
2011 android
2011 android2011 android
2011 android
 
Google Android Naver 1212
Google Android Naver 1212Google Android Naver 1212
Google Android Naver 1212
 
Android application development
Android application developmentAndroid application development
Android application development
 
Android OS
Android OSAndroid OS
Android OS
 
Soa204 Kawasaki Final
Soa204 Kawasaki FinalSoa204 Kawasaki Final
Soa204 Kawasaki Final
 
Windows Phone 7.5 와 Windows 8 메트로 스타일 앱 개발
Windows Phone 7.5  와 Windows 8 메트로 스타일 앱 개발Windows Phone 7.5  와 Windows 8 메트로 스타일 앱 개발
Windows Phone 7.5 와 Windows 8 메트로 스타일 앱 개발
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012
 
air
airair
air
 
Android Handheld Systems
Android Handheld SystemsAndroid Handheld Systems
Android Handheld Systems
 
Android Seminar
Android SeminarAndroid Seminar
Android Seminar
 
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
 
Introducing Windows Runtime in Windows 8
Introducing Windows Runtime in Windows 8Introducing Windows Runtime in Windows 8
Introducing Windows Runtime in Windows 8
 
Mono for android
Mono for androidMono for android
Mono for android
 
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
 

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
 

Android For Managers Slides

  • 1. Android   Overview  For   Managers   Marko  Gargenta   Marakana  
  • 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   Java EE Java Source Java SE Code Java Java ME Compiler CDC Java ME Java Byte CLDC Code Dex Compiler Dalvik Byte Code
  • 5. Android  Versus  Java  ME   Just one type of device – no CDC/CLDC Easier to understand – no MIDlets, Xlets, AWT Responsive – Dalvik vs. one–size-fits-all JVM Java (in)compatibility Adoption
  • 8. 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
  • 9. NaSve  Libraries   Native C libraries provide many of Applications key Android services, such as: Home Contacts Phone Browser Other Surface Manager, for composing Application Framework window manager with off-screen Activity Window Content View buffering Manager Manager Providers System Package Telephony Resource Location Notiication Manager Manager Manager Manager Manager 2D and 3D graphics hardware Libraries support or software simulation Surface Media SQLite Android Runtime Manager Framework Core Libs Media codecs offer support for OpenGL FreeType WebKit Delvik major audio/video codecs SGL SSL libc VM SQLite database Display Camera Linux Kernel Flash Binder Driver Driver Driver Driver Keypad WiFi Audio Power WebKit library for fast HTML Driver Driver Driver Mgmt rendering
  • 10. 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
  • 11. ApplicaSon  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
  • 13. Android  SDK  -­‐  What’s  in  the  box   SDK Tools Docs Platforms Data Skins Images Samples Add-ons Google Maps
  • 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   AcSvity   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. AcSviSes   Activity is to an Android Application application what a Main Activity Another Another Activity Activity web page is to a website. Sort of.
  • 22. AcSvity  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.
  • 28. 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
  • 29. XML-­‐Based  User  Interface   Use WYSIWYG tools to build powerful XML-based UI. Easily customize it from Java. Separate concerns.
  • 30. 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  oden  used  by  Google   sp   Similar  to  dp  but  also  scaled  by  users  font   size  preference  
  • 31. Views  and  Layouts   ViewGroup ViewGroup View View View View ViewGroups contain other Views but are also Views themselves.
  • 32. Common  UI  Components   Android UI includes many common modern UI widgets, such as Buttons, Tabs, Progress Bars, Date and Time Pickers, etc.
  • 33. SelecSon  Components   Some UI widgets may be linked to zillions of pieces of data. Examples are ListView and Spinners (pull-downs).
  • 34. 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.
  • 35. 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.
  • 36. Building  UI  for  Performance   A handy Hierarchy Viewer tool helps with optimizing the UI for performance
  • 38. Graphics  &  AnimaSon   Android has rich support for 2D graphics. You can draw & animate from XML. You can use OpenGL for 3D graphics.
  • 40. File  System   The file system has three main mount points. One for system, one for the apps, and one for whatever. Each app has its own sandbox easily accessible to it. No one else can access its data. The sandbox is in /data/data/com.marakana/ SDCard is expected to always be there. It’s a good place for large files, such as movies and music. Everyone can access it.
  • 41. Preferences   Your app can support complex preferences quite easily. You define your preferences in an XML file and the corresponding UI and data storage is done for free.
  • 42. NoSficaSons   Notifications are useful for applications to notify user of things going on in the background. Notifications are implemented via Notification Manager.
  • 43. Security   Each Android application Android Application runs inside its own Linux process. Linux Process Additionally, each application has its own sandbox file File system with its own set of Prefs DB System preferences and its own database. Other applications cannot access any of its data, unless it is explicitly shared.
  • 44. SQLite  Database   Android ships with SQLite3 SQLite is Zero configuration Serverless Single database file Cross-Platform Compact Public Domain Database engine. May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give.
  • 45. MulSmedia   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();
  • 46. Sensors   Android supports many built-in sensors. You simply register with Sensor Manager to get notifications when sensor data changes. Sensors are erratic and data comes in uneven intervals. Emulator doesn’t have good support for sensors.
  • 47. 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" />
  • 49. Camera   Android SDK supports access to built-in Camera and its preview. You can access real-time frames, or get a callback when shutter is open. The photo data is passed back in either raw or jpeg format.
  • 50. WiFi   WiFi API allows for managing your connection, scanning for active WiFi points and find out details about each.
  • 51. Telephony   With Telephony API, you can: Make phone calls Monitor phone state and activity Access phone properties and status Monitor data connectivity Control the phone It is a simple yet powerful API
  • 52. Summary   Android is open Android is simple Android is complete Android has apps Android uses Java Geeks love Android OEMs love Android Operators like Android Android UI is not as sexy Android doesn’t have as many apps Android doesn’t have THE phone Yet.