SlideShare uma empresa Scribd logo
1 de 63
Baixar para ler offline
O mundo de
smartphones em
 suas mãos com
 Google Android
Quem são esses caras?
Daniel Passos
     @passos


Arquiteto de Software


      Instrutor
Fábio Pimentel
@fabiopimentel

   Instrutor
?
Open Handset Alliance
http://source.android.com
X
Text




http://www.youtube.com/watch?v=ZwzXvRpoPP4
X
1.5         1.5
      JSE
Symbian
// HelloWorld.cpp
//
#include "CommonFramework.h"
// do the example
LOCAL_C void doExampleL()
{
_LIT(KHelloWorldText,"Hello world!n");
console->Printf(KHelloWorldText);
}
// HelloWorld.mmp
//
// Copyright (c) 2000 Symbian Ltd. All rights reserved.
//
// using relative paths for sourcepath and user includes
//
TARGET HelloWorld.exe
TARGETTYPE exe
UID 0
//
SOURCEPATH .
SOURCE HelloWorld.cpp
//
USERINCLUDE .
USERINCLUDE ..CommonFramework
SYSTEMINCLUDE Epoc32include
//
Windows Mobile




using System;
using System.Windows.Forms;

public class HelloWorld {

    public static void Main() {

        MessageBox.Show( "Hello World!" );

    }
}
// helloworldAppDelegate.m
                                                      // helloworld

                                                      #import "helloworldAppDelegate.h"
                                                      #import "MyView.h"


              Objective C                             @implementation helloworldAppDelegate

                                                      @synthesize window;
                                                      @synthesize contentView;
                                                      // Levi: Tell the compiler to synthesize relevant accessors
                                                      @synthesize textView;

                                                      - (void)applicationDidFinishLaunching:(UIApplication *)
                                                      application {
// helloworldAppDelegate.h                               // Create window
// helloworld                                            self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen
                                                      mainScreen] bounds]]
#import <UIKit/UIKit.h>                                  self.contentView = [[[MyView alloc] initWithFrame:
                                                      [[UIScreen mainScreen] applicationFrame]] autorelease];
@class MyView;                                           [window addSubview:contentView];

@interface helloworldAppDelegate : NSObject {           //
  UIWindow *window;                                     self.textView = [[[UITextView alloc] initWithFrame:
  MyView *contentView;                                CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)] autorelease];
  // Levi: Define textView object                        [textView setEditable:YES];
  UITextView *textView;                                 [textView setText:@"Hello
}                                                       [contentView
                                                        [window makeKeyAndVisible];
@property (nonatomic, retain) UIWindow *window;       }
@property (nonatomic, retain) MyView *contentView;
// Levi: Declare textView as a property               - (void)dealloc {
@property (nonatomic, retain) UITextView *textView;      // Levi: Release the textView
                                                         [textView release];
@end                                                     [contentView release];
                                                         [window release];
                                                         [super dealloc];
                                                      }

                                                      @end
Android



package com.android.hello;

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

public class HelloAndroid extends Activity {
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     TextView tv = new TextView(this);
     tv.setText("Hello World");
     setContentView(tv);
  }
}
Legal! Mas como essa
  bagaça funciona?
!=
1.5         1.5
      JSE
JVM
Surface Manager
OpenGL
API livre utilizada para desenvolvimento de aplicativos gráficos,
ambientes 3D, jogos, entre outros.




                      http://www.youtube.com/watch?v=KtzTL3y4RTA
Media Framework
SQLite
‣ É Software Livre/domínio público e Multiplataforma
‣ É um mecanismo de armazenamento seguro com
  transações ACID
‣ Implementa a maioria do SQL92
‣ Suporta bases de dados acima de 2 terabytes
‣ Sem dependências externas
WebKit
libc

#include <stdio.h>
#include <unistd.h>
int main(int argc, char **argv, char**env) {
  int i;
  for (i = 0; i < argc; i++) {
      printf("argv[%d] = %sn", i, argv[i]);
  }
  for (i = 0; env[i] != NULL; i++) {
      printf("env[%d] = %sn", i, env[i]);
  }
  printf("PATH = %sn", getenv("PATH"));
  setenv("HELLO", "world!", 1);
  putenv("GOODBYE=cruel world!");
  printf("HELLO = %sn", getenv("HELLO"));
  printf("GOODBYE = %sn", getenv("GOODBYE"));
  return 0;
}
Activity

  # Tela

  # Independente

  # Pode ser invocada por outra app
Activity
Activity
      Activity
       starts




     onCreate()




      onStart()




    onResume()




  Activity running
Activity
                                  Return to app    onStart()




                       Activity
                                                  onResume()
                       running


Activity destroyed     Recebe
                      Chamada



   onDestroy()        onPause()




 Pouca Memoria        onStop()
Content Provider

      # Armazenar e recupera dados

      # Consome dados de outras apps

      # Expoem dados da sua aplicação
Broadcast receiver


       # Responde as mensagens do sistema
Mas como eu faço pra
    programar?
http://developer.android.com/sdk
1.0
23/09/2008
1.1
09/02/2009
1.5
  30/04/2009




Cupcake
  ■   Widget
  ■   Gravação de Video
  ■   Gallery: Video playback (MPEG-4 & 3GP formats)
  ■   Bluetooth: Suporte a Stereo (A2DP and AVRCP profiles),
      Auto Pareamento
  ■   Browser: Copy and paste
  ■   Animações em trasições de tela
  ■   Upload YouTube
  ■   Upload Picasa
1.6
 15/09/2009




Donut

 ■   Voice Search
 ■   Android Market: Facilitaram a busca, screenshots, etc.
 ■   Melhoria no acesso a câmera
 ■   Display: Suporte a resolução WVGA
2.0/2.1
 26/10/2009




Eclair
  ■   Sincronismo com multiplas contas, inclusive Exchange
  ■   Bluetooth: 2.1
  ■   Camera: Flash, zoom digital, Scene mode, White balance, Color
      effect, Macro focus
  ■   Browser: Double-tap zoom, Support for HTML5
  ■   System: Otimização de Hardware
  ■   Display: Suporte a novos tamanhos de tela
  ■   Maps: Google Maps 3.1.2
  ■   Live Wallpapers: Imagens animadas na Home screen
2.2
 20/05/2010




Froyo

 ■   System: Otimização de memoria e performance
 ■   Chrome's V8 JavaScript engine
 ■   USB tethering & Wi-Fi hotspot
 ■   Discagem por voz e compartilhamento de contatos através de
     Bluetooth
 ■   Adobe Flash support
 ■   DPI screens (320 dpi), such as 4" 720p
2.3/2.3.3
    06/12/2010




Gingerbread

    ■   Display: extra-large (WXGA)
    ■   Suporte nativo a SIP VoIP
    ■   Near Field Communication
    ■   Media: WebM/VP8 & AAC audio encoding
3.0
   26/02/2011




Honeycomb
   ■   Pensado e otimozado para tablets
   ■   System Bar: acesso rápido às notificações, status, e botões de
       navegação suave disponível na parte inferior da tela.
   ■   Action Bar: Acesso a opções contextual, navegação, widgets, ou
       outros tipos de conteúdo no topo da tela.
   ■   Multitasking:
   ■   Suporte a video chat com Google Talk
   ■   Suporte a multiplos processadores de multiplos nucleos
3.1
   10/05/2011




Honeycomb

   ■   Conectividade com acessórios por USB
   ■   Suporte a teclados externos
   ■   Suporte a joysticks & gamepads
?
        ?



Ice Cream Sandwich
http://developer.android.com/sdk/eclipse-adt.html


             Android Development Tools (ADT)
E agora?
http://developer.android.com




*http://groups.google.com/group/android-developers/   (Oficial)


*http://groups.google.com/group/androidbrasil-dev
FJ-57 |Desenvolvimento móvel com
          Google Android
Obrigado!




        Daniel Passos                 Fabio Pimentel
           @passos                    @fabiopimentel
daniel.passos@caelum.com.br   fabio.pimentel@caelum.com.br

Mais conteúdo relacionado

Mais procurados

Desenvolvimento de aplicativos móveis para Android utilizando Java - 1/3
Desenvolvimento de aplicativos móveis para Android utilizando Java - 1/3Desenvolvimento de aplicativos móveis para Android utilizando Java - 1/3
Desenvolvimento de aplicativos móveis para Android utilizando Java - 1/3Claudinei Brito Junior
 
SESTINFO 2011 Apresentacao Android
SESTINFO 2011 Apresentacao AndroidSESTINFO 2011 Apresentacao Android
SESTINFO 2011 Apresentacao AndroidRafael Sakurai
 
Construindo portlets para IBM WebSphere Portal – Parte 2
Construindo portlets para IBM WebSphere Portal – Parte 2Construindo portlets para IBM WebSphere Portal – Parte 2
Construindo portlets para IBM WebSphere Portal – Parte 2rodrigoareis
 
Build Automation Evolved
Build Automation EvolvedBuild Automation Evolved
Build Automation EvolvedMarcelo Diniz
 
Introdução ao Android (minicurso 4h)
Introdução ao Android (minicurso 4h)Introdução ao Android (minicurso 4h)
Introdução ao Android (minicurso 4h)Rodrigo Rocha
 
Integração Contínua com Cruise Control e phpUnderControl
Integração Contínua com Cruise Control e phpUnderControlIntegração Contínua com Cruise Control e phpUnderControl
Integração Contínua com Cruise Control e phpUnderControlDiego Tremper
 

Mais procurados (7)

Desenvolvimento de aplicativos móveis para Android utilizando Java - 1/3
Desenvolvimento de aplicativos móveis para Android utilizando Java - 1/3Desenvolvimento de aplicativos móveis para Android utilizando Java - 1/3
Desenvolvimento de aplicativos móveis para Android utilizando Java - 1/3
 
SESTINFO 2011 Apresentacao Android
SESTINFO 2011 Apresentacao AndroidSESTINFO 2011 Apresentacao Android
SESTINFO 2011 Apresentacao Android
 
Construindo portlets para IBM WebSphere Portal – Parte 2
Construindo portlets para IBM WebSphere Portal – Parte 2Construindo portlets para IBM WebSphere Portal – Parte 2
Construindo portlets para IBM WebSphere Portal – Parte 2
 
Build Automation Evolved
Build Automation EvolvedBuild Automation Evolved
Build Automation Evolved
 
Wxpython (texto incompleto)
Wxpython (texto incompleto)Wxpython (texto incompleto)
Wxpython (texto incompleto)
 
Introdução ao Android (minicurso 4h)
Introdução ao Android (minicurso 4h)Introdução ao Android (minicurso 4h)
Introdução ao Android (minicurso 4h)
 
Integração Contínua com Cruise Control e phpUnderControl
Integração Contínua com Cruise Control e phpUnderControlIntegração Contínua com Cruise Control e phpUnderControl
Integração Contínua com Cruise Control e phpUnderControl
 

Destaque (20)

Ebtee Presentation
Ebtee PresentationEbtee Presentation
Ebtee Presentation
 
Movie it process
Movie it processMovie it process
Movie it process
 
Triangle Gives Back: Helping You Serve Others
Triangle Gives Back: Helping You Serve OthersTriangle Gives Back: Helping You Serve Others
Triangle Gives Back: Helping You Serve Others
 
Power point
Power pointPower point
Power point
 
Convenio hosteleria ourense 2011 2013
Convenio hosteleria ourense 2011 2013Convenio hosteleria ourense 2011 2013
Convenio hosteleria ourense 2011 2013
 
GWAB 2015 - Data Plaraform
GWAB 2015 - Data PlaraformGWAB 2015 - Data Plaraform
GWAB 2015 - Data Plaraform
 
Acta c.i. 30 09-2011 logo
Acta c.i. 30 09-2011 logoActa c.i. 30 09-2011 logo
Acta c.i. 30 09-2011 logo
 
αστροφυσική
αστροφυσικήαστροφυσική
αστροφυσική
 
Digi Conv
Digi ConvDigi Conv
Digi Conv
 
Suitable exposure
Suitable exposureSuitable exposure
Suitable exposure
 
עונשים בצבא
עונשים בצבאעונשים בצבא
עונשים בצבא
 
San Agustin Evaluation Of A Low Cost Open Source Gaze Tracker
San Agustin Evaluation Of A Low Cost Open Source Gaze TrackerSan Agustin Evaluation Of A Low Cost Open Source Gaze Tracker
San Agustin Evaluation Of A Low Cost Open Source Gaze Tracker
 
Rule esw print
Rule esw printRule esw print
Rule esw print
 
Nossa Rotina 2
Nossa Rotina 2Nossa Rotina 2
Nossa Rotina 2
 
Hulu
HuluHulu
Hulu
 
SelfRJ - Aerogear iOS
SelfRJ - Aerogear iOSSelfRJ - Aerogear iOS
SelfRJ - Aerogear iOS
 
Acta%20 comision%20mixta%202011
Acta%20 comision%20mixta%202011Acta%20 comision%20mixta%202011
Acta%20 comision%20mixta%202011
 
Designer-Engine LTD
Designer-Engine LTDDesigner-Engine LTD
Designer-Engine LTD
 
Peri porsi
Peri porsiPeri porsi
Peri porsi
 
Nmikpowerpoint
NmikpowerpointNmikpowerpoint
Nmikpowerpoint
 

Semelhante a Desenvolvimento móvel com Google Android

Minicurso Android Ronildo Oliveira
Minicurso Android  Ronildo OliveiraMinicurso Android  Ronildo Oliveira
Minicurso Android Ronildo OliveiraRonildo Oliveira
 
Phonegap - Framework Mobile
Phonegap - Framework MobilePhonegap - Framework Mobile
Phonegap - Framework MobileIldyone Martins
 
2017 08-11 - Androidos V - Minicurso - Introdução ao android
2017 08-11 - Androidos V - Minicurso - Introdução ao android2017 08-11 - Androidos V - Minicurso - Introdução ao android
2017 08-11 - Androidos V - Minicurso - Introdução ao androidMessias Batista
 
Curso de android
Curso de androidCurso de android
Curso de androidflaviokreis
 
Swift, a nova linguagem de programação da Apple (CocoaHeads Sao Paulo)
Swift, a nova linguagem de programação da Apple (CocoaHeads Sao Paulo)Swift, a nova linguagem de programação da Apple (CocoaHeads Sao Paulo)
Swift, a nova linguagem de programação da Apple (CocoaHeads Sao Paulo)Juliana Chahoud
 
iOS Delegates - Mobile Conf Rio 2014
iOS Delegates - Mobile Conf Rio 2014iOS Delegates - Mobile Conf Rio 2014
iOS Delegates - Mobile Conf Rio 2014osnipso
 
Introdução ao Google TV
Introdução ao Google TVIntrodução ao Google TV
Introdução ao Google TVAécio Costa
 
Seminário sd android_exemplos
Seminário sd android_exemplosSeminário sd android_exemplos
Seminário sd android_exemplosCalvin Rodrigues
 
Minicurso de Desenvolvimento Android - Iguatu - CE
Minicurso de Desenvolvimento Android - Iguatu - CEMinicurso de Desenvolvimento Android - Iguatu - CE
Minicurso de Desenvolvimento Android - Iguatu - CERonildo Oliveira
 
Chrome Apps e NodeWebkit: traga seu webapp para o Desktop - #outubrorosa
Chrome Apps e NodeWebkit: traga seu webapp para o Desktop - #outubrorosaChrome Apps e NodeWebkit: traga seu webapp para o Desktop - #outubrorosa
Chrome Apps e NodeWebkit: traga seu webapp para o Desktop - #outubrorosaJoselito Nascimento
 
Chega de lendas! JavaFX em Android
Chega de lendas! JavaFX em AndroidChega de lendas! JavaFX em Android
Chega de lendas! JavaFX em AndroidBruno Oliveira
 
Introdução à Programação para iPhone (iOS)
Introdução à Programação para iPhone (iOS)Introdução à Programação para iPhone (iOS)
Introdução à Programação para iPhone (iOS)Jorge Cardoso
 
Aplicações móveis multi-plataforma com Titanium - Geek Night
Aplicações móveis multi-plataforma com Titanium - Geek NightAplicações móveis multi-plataforma com Titanium - Geek Night
Aplicações móveis multi-plataforma com Titanium - Geek NightEric Cavalcanti
 
Utiizando o Celular no Apoio à Gerência de configuração
Utiizando o Celular no Apoio à Gerência de configuraçãoUtiizando o Celular no Apoio à Gerência de configuração
Utiizando o Celular no Apoio à Gerência de configuraçãoJaguaraci Silva
 
Aplicações Híbridas para Dispositivos Móveis com AngularJS e PhoneGap
Aplicações Híbridas para Dispositivos Móveis com AngularJS e PhoneGapAplicações Híbridas para Dispositivos Móveis com AngularJS e PhoneGap
Aplicações Híbridas para Dispositivos Móveis com AngularJS e PhoneGapThiago Colares
 

Semelhante a Desenvolvimento móvel com Google Android (20)

Phonegap
PhonegapPhonegap
Phonegap
 
Kotlin first
Kotlin firstKotlin first
Kotlin first
 
Minicurso Android Ronildo Oliveira
Minicurso Android  Ronildo OliveiraMinicurso Android  Ronildo Oliveira
Minicurso Android Ronildo Oliveira
 
Apresentação Google Android
Apresentação Google AndroidApresentação Google Android
Apresentação Google Android
 
Carthage ou cocoapods
Carthage ou cocoapodsCarthage ou cocoapods
Carthage ou cocoapods
 
Phonegap - Framework Mobile
Phonegap - Framework MobilePhonegap - Framework Mobile
Phonegap - Framework Mobile
 
2017 08-11 - Androidos V - Minicurso - Introdução ao android
2017 08-11 - Androidos V - Minicurso - Introdução ao android2017 08-11 - Androidos V - Minicurso - Introdução ao android
2017 08-11 - Androidos V - Minicurso - Introdução ao android
 
Curso de android
Curso de androidCurso de android
Curso de android
 
Python Para Maemo
Python Para MaemoPython Para Maemo
Python Para Maemo
 
Swift, a nova linguagem de programação da Apple (CocoaHeads Sao Paulo)
Swift, a nova linguagem de programação da Apple (CocoaHeads Sao Paulo)Swift, a nova linguagem de programação da Apple (CocoaHeads Sao Paulo)
Swift, a nova linguagem de programação da Apple (CocoaHeads Sao Paulo)
 
iOS Delegates - Mobile Conf Rio 2014
iOS Delegates - Mobile Conf Rio 2014iOS Delegates - Mobile Conf Rio 2014
iOS Delegates - Mobile Conf Rio 2014
 
Introdução ao Google TV
Introdução ao Google TVIntrodução ao Google TV
Introdução ao Google TV
 
Seminário sd android_exemplos
Seminário sd android_exemplosSeminário sd android_exemplos
Seminário sd android_exemplos
 
Minicurso de Desenvolvimento Android - Iguatu - CE
Minicurso de Desenvolvimento Android - Iguatu - CEMinicurso de Desenvolvimento Android - Iguatu - CE
Minicurso de Desenvolvimento Android - Iguatu - CE
 
Chrome Apps e NodeWebkit: traga seu webapp para o Desktop - #outubrorosa
Chrome Apps e NodeWebkit: traga seu webapp para o Desktop - #outubrorosaChrome Apps e NodeWebkit: traga seu webapp para o Desktop - #outubrorosa
Chrome Apps e NodeWebkit: traga seu webapp para o Desktop - #outubrorosa
 
Chega de lendas! JavaFX em Android
Chega de lendas! JavaFX em AndroidChega de lendas! JavaFX em Android
Chega de lendas! JavaFX em Android
 
Introdução à Programação para iPhone (iOS)
Introdução à Programação para iPhone (iOS)Introdução à Programação para iPhone (iOS)
Introdução à Programação para iPhone (iOS)
 
Aplicações móveis multi-plataforma com Titanium - Geek Night
Aplicações móveis multi-plataforma com Titanium - Geek NightAplicações móveis multi-plataforma com Titanium - Geek Night
Aplicações móveis multi-plataforma com Titanium - Geek Night
 
Utiizando o Celular no Apoio à Gerência de configuração
Utiizando o Celular no Apoio à Gerência de configuraçãoUtiizando o Celular no Apoio à Gerência de configuração
Utiizando o Celular no Apoio à Gerência de configuração
 
Aplicações Híbridas para Dispositivos Móveis com AngularJS e PhoneGap
Aplicações Híbridas para Dispositivos Móveis com AngularJS e PhoneGapAplicações Híbridas para Dispositivos Móveis com AngularJS e PhoneGap
Aplicações Híbridas para Dispositivos Móveis com AngularJS e PhoneGap
 

Mais de Daniel Passos

Why I'm in love with Firebase
Why I'm in love with FirebaseWhy I'm in love with Firebase
Why I'm in love with FirebaseDaniel Passos
 
F2F 2015 - Client SDK (Specific Plataform Android)
F2F 2015 - Client SDK (Specific Plataform Android)F2F 2015 - Client SDK (Specific Plataform Android)
F2F 2015 - Client SDK (Specific Plataform Android)Daniel Passos
 
JudCon Brazil 2014 - Mobile push for all platforms
JudCon Brazil 2014 - Mobile push for all platformsJudCon Brazil 2014 - Mobile push for all platforms
JudCon Brazil 2014 - Mobile push for all platformsDaniel Passos
 
MobileConf 2013 - Aerogear Android
MobileConf 2013 - Aerogear AndroidMobileConf 2013 - Aerogear Android
MobileConf 2013 - Aerogear AndroidDaniel Passos
 
JudCon - Aerogear Android
JudCon - Aerogear AndroidJudCon - Aerogear Android
JudCon - Aerogear AndroidDaniel Passos
 

Mais de Daniel Passos (6)

Why I'm in love with Firebase
Why I'm in love with FirebaseWhy I'm in love with Firebase
Why I'm in love with Firebase
 
F2F 2015 - Client SDK (Specific Plataform Android)
F2F 2015 - Client SDK (Specific Plataform Android)F2F 2015 - Client SDK (Specific Plataform Android)
F2F 2015 - Client SDK (Specific Plataform Android)
 
JudCon Brazil 2014 - Mobile push for all platforms
JudCon Brazil 2014 - Mobile push for all platformsJudCon Brazil 2014 - Mobile push for all platforms
JudCon Brazil 2014 - Mobile push for all platforms
 
MobileConf 2013 - Aerogear Android
MobileConf 2013 - Aerogear AndroidMobileConf 2013 - Aerogear Android
MobileConf 2013 - Aerogear Android
 
JudCon - Aerogear Android
JudCon - Aerogear AndroidJudCon - Aerogear Android
JudCon - Aerogear Android
 
Fragments
FragmentsFragments
Fragments
 

Desenvolvimento móvel com Google Android

  • 1. O mundo de smartphones em suas mãos com Google Android
  • 3. Daniel Passos @passos Arquiteto de Software Instrutor
  • 5. ?
  • 6.
  • 8.
  • 10.
  • 11. X
  • 12.
  • 14.
  • 15.
  • 16. X
  • 17. 1.5 1.5 JSE
  • 18.
  • 19. Symbian // HelloWorld.cpp // #include "CommonFramework.h" // do the example LOCAL_C void doExampleL() { _LIT(KHelloWorldText,"Hello world!n"); console->Printf(KHelloWorldText); } // HelloWorld.mmp // // Copyright (c) 2000 Symbian Ltd. All rights reserved. // // using relative paths for sourcepath and user includes // TARGET HelloWorld.exe TARGETTYPE exe UID 0 // SOURCEPATH . SOURCE HelloWorld.cpp // USERINCLUDE . USERINCLUDE ..CommonFramework SYSTEMINCLUDE Epoc32include //
  • 20. Windows Mobile using System; using System.Windows.Forms; public class HelloWorld { public static void Main() { MessageBox.Show( "Hello World!" ); } }
  • 21. // helloworldAppDelegate.m // helloworld #import "helloworldAppDelegate.h" #import "MyView.h" Objective C @implementation helloworldAppDelegate @synthesize window; @synthesize contentView; // Levi: Tell the compiler to synthesize relevant accessors @synthesize textView; - (void)applicationDidFinishLaunching:(UIApplication *) application { // helloworldAppDelegate.h // Create window // helloworld self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] #import <UIKit/UIKit.h> self.contentView = [[[MyView alloc] initWithFrame: [[UIScreen mainScreen] applicationFrame]] autorelease]; @class MyView; [window addSubview:contentView]; @interface helloworldAppDelegate : NSObject { // UIWindow *window; self.textView = [[[UITextView alloc] initWithFrame: MyView *contentView; CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)] autorelease]; // Levi: Define textView object [textView setEditable:YES]; UITextView *textView; [textView setText:@"Hello } [contentView [window makeKeyAndVisible]; @property (nonatomic, retain) UIWindow *window; } @property (nonatomic, retain) MyView *contentView; // Levi: Declare textView as a property - (void)dealloc { @property (nonatomic, retain) UITextView *textView; // Levi: Release the textView [textView release]; @end [contentView release]; [window release]; [super dealloc]; } @end
  • 22. Android package com.android.hello; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setText("Hello World"); setContentView(tv); } }
  • 23. Legal! Mas como essa bagaça funciona?
  • 24.
  • 25.
  • 26.
  • 27. !=
  • 28.
  • 29. 1.5 1.5 JSE
  • 30. JVM
  • 31.
  • 32.
  • 34. OpenGL API livre utilizada para desenvolvimento de aplicativos gráficos, ambientes 3D, jogos, entre outros. http://www.youtube.com/watch?v=KtzTL3y4RTA
  • 36. SQLite ‣ É Software Livre/domínio público e Multiplataforma ‣ É um mecanismo de armazenamento seguro com transações ACID ‣ Implementa a maioria do SQL92 ‣ Suporta bases de dados acima de 2 terabytes ‣ Sem dependências externas
  • 38. libc #include <stdio.h> #include <unistd.h> int main(int argc, char **argv, char**env) { int i; for (i = 0; i < argc; i++) { printf("argv[%d] = %sn", i, argv[i]); } for (i = 0; env[i] != NULL; i++) { printf("env[%d] = %sn", i, env[i]); } printf("PATH = %sn", getenv("PATH")); setenv("HELLO", "world!", 1); putenv("GOODBYE=cruel world!"); printf("HELLO = %sn", getenv("HELLO")); printf("GOODBYE = %sn", getenv("GOODBYE")); return 0; }
  • 39.
  • 40. Activity # Tela # Independente # Pode ser invocada por outra app
  • 42. Activity Activity starts onCreate() onStart() onResume() Activity running
  • 43. Activity Return to app onStart() Activity onResume() running Activity destroyed Recebe Chamada onDestroy() onPause() Pouca Memoria onStop()
  • 44. Content Provider # Armazenar e recupera dados # Consome dados de outras apps # Expoem dados da sua aplicação
  • 45. Broadcast receiver # Responde as mensagens do sistema
  • 46.
  • 47. Mas como eu faço pra programar?
  • 49.
  • 52. 1.5 30/04/2009 Cupcake ■ Widget ■ Gravação de Video ■ Gallery: Video playback (MPEG-4 & 3GP formats) ■ Bluetooth: Suporte a Stereo (A2DP and AVRCP profiles), Auto Pareamento ■ Browser: Copy and paste ■ Animações em trasições de tela ■ Upload YouTube ■ Upload Picasa
  • 53. 1.6 15/09/2009 Donut ■ Voice Search ■ Android Market: Facilitaram a busca, screenshots, etc. ■ Melhoria no acesso a câmera ■ Display: Suporte a resolução WVGA
  • 54. 2.0/2.1 26/10/2009 Eclair ■ Sincronismo com multiplas contas, inclusive Exchange ■ Bluetooth: 2.1 ■ Camera: Flash, zoom digital, Scene mode, White balance, Color effect, Macro focus ■ Browser: Double-tap zoom, Support for HTML5 ■ System: Otimização de Hardware ■ Display: Suporte a novos tamanhos de tela ■ Maps: Google Maps 3.1.2 ■ Live Wallpapers: Imagens animadas na Home screen
  • 55. 2.2 20/05/2010 Froyo ■ System: Otimização de memoria e performance ■ Chrome's V8 JavaScript engine ■ USB tethering & Wi-Fi hotspot ■ Discagem por voz e compartilhamento de contatos através de Bluetooth ■ Adobe Flash support ■ DPI screens (320 dpi), such as 4" 720p
  • 56. 2.3/2.3.3 06/12/2010 Gingerbread ■ Display: extra-large (WXGA) ■ Suporte nativo a SIP VoIP ■ Near Field Communication ■ Media: WebM/VP8 & AAC audio encoding
  • 57. 3.0 26/02/2011 Honeycomb ■ Pensado e otimozado para tablets ■ System Bar: acesso rápido às notificações, status, e botões de navegação suave disponível na parte inferior da tela. ■ Action Bar: Acesso a opções contextual, navegação, widgets, ou outros tipos de conteúdo no topo da tela. ■ Multitasking: ■ Suporte a video chat com Google Talk ■ Suporte a multiplos processadores de multiplos nucleos
  • 58. 3.1 10/05/2011 Honeycomb ■ Conectividade com acessórios por USB ■ Suporte a teclados externos ■ Suporte a joysticks & gamepads
  • 59. ? ? Ice Cream Sandwich
  • 60. http://developer.android.com/sdk/eclipse-adt.html Android Development Tools (ADT)
  • 61. E agora? http://developer.android.com *http://groups.google.com/group/android-developers/ (Oficial) *http://groups.google.com/group/androidbrasil-dev
  • 62. FJ-57 |Desenvolvimento móvel com Google Android
  • 63. Obrigado! Daniel Passos Fabio Pimentel @passos @fabiopimentel daniel.passos@caelum.com.br fabio.pimentel@caelum.com.br