SlideShare a Scribd company logo
1 of 63
Download to read offline
Android Development

             FRI ŽU
             SOIT.sk
              Žilina
            24.2. 2011


          Juraj Michálek

Twitter: http://twitter.com/georgiksk
Blog: http://georgik.sinusgear.com
Obsah

  Platforma Android

Vývoj na platforme AIR

     Vývoj Java

     Testovanie

Výkon a použiteľnosť

   Predaj aplikácií
Android




Open source platforma
pre mobilné zariadenia.
História



     30.4. 2009

Android 1.5 – Cupcake

 Linux kernel 2.6.27
Ďalšie verzie

              1.6. Donut – gestá

   2.0/2.1 Eclair – HTML5, Exchange Sync

2.2 Froyo – lepší JIT, Adobe Flash Player a AIR

 2.3 Gingerbread – úpravy UI a použiteľnosti

 3.0 Honeycomb – multicore, hw akcelerácia
Aktuálne verzie




   Zdroj: wikipedia.org
Android a Linux



  Kernel pochádza z Linuxového jadra.

        Google má vlastný fork.

Časť úprav jadra od Google je opakovane
      zamietaná už od roku 2009.
Architektúra




  Zdroj Wikipedia
Android open source




             http://source.android.com

git clone git://android.git.kernel.org/ + project path.

           Apache Software License 2.0
Možnosti vývoja


      Java

     C/C++

      AIR

 HTML/JavaScript
Java


        Dalvik VM

register based architecture

 Dalvik Executable (.dex)

 mobily, tablety, netbooky
C/C++




        hm

Skutočne to chcete?
C/C++ NDK




Using native code does not result in an automatic
  performance increase, but always increases
             application complexity.
Android SDK




http://developer.android.com

  SDK + emulátor (qemu)
Adobe AIR



    Multiplatform runtime
Linux, Mac, Windows, Mobile

            RIA

    Flash Builder Burrito
Flash Builder Burrito


 Vývojové prostredie na Eclipse

         Mac, Windows

     http://labs.adobe.com

Študenti a akademický pracovníci
        - licencia zdarma
Flex SDK Hero



      Mozilla Public licence

   Linux, Mac, Windows, BSD

Flex SDK 4.5 – podpora mobilných
            zariadení
Flex Mobile Project
Mobile Wizard
Backend, Config
Design View
Source View
Run configuration
Run - Desktop
Debug
Debug v emulátore
Break point v emulátore
Export Release Build
AIR Runtime pre Android


              Adobe Flash Builder
Burrito/sdks/4.5.0/runtimes/air/android/emulator

                 Runtime.apk



            adb install Runtime.apk
Release pre emulátor

                                Air packager:
             adt -package -target apk-emulator -storetype pkcs12
             -keystore cert.p12 Main.apk Main-app.xml Main.swf


                                Install:
                         adb install Main.apk


                                 Podrobný popis
http://georgik.sinusgear.com/2011/01/02/how-to-package-air-app-for-google-android-emulator/
Tour de Mobile




http://flex.org/tourmobile
Air aplikácie pre Android




http://www.appbrain.com/apps/adobe-air/
Eclipse




Plugin ADT
Nastavenie cesty k SDK
Nový/Import projektu
Run as Android Application
IntelliJ IDEA




     Podpora pre Android
http://www.jetbrains.com/idea
jQuery mobile




http://jquerymobile.com/
App Inventor




http://appinventor.googlelabs.com
Android Debug Bridge


      adb <param>

          devices
            shell
   push/pull <src> <dst>
      install/uninstall
 forward <local> <remote>
           logcat
         bugreport
ADB Scripting


     shell <command>

       wait-for-device
         start-server
          kill-server
          get-state
reboot [bootloader|recovery]
System properties



  adb shell getprop

Nastavenia od výrobcu.

  Root môže meniť.
Activity Manager




am profile PID start LOGFILE
    am profile PID stop

    traceview LOGFILE
Rýchlosť a reakcie



Vytvárať len úlohy, ktoré majú význam.

Alokovať len nutné množstvo zdrojov.

        Performance pointers.
Progress



           Prefetch

 Problém s modálnymi oknami

     5 sekúnd na reakciu

Background thread – Async Task
Spotreba energie

 Systémové zdroje je nutné
   používať zodpovedne.

     Kontrola senzorov.

Prenos údajov – zdieľať údaje.

Framework je optimalizovaný.

         Wake lock
Použiteľnosť

         Využiť navigáciu,
     ktorú používateľ očakáva.

      Skrývanie status baru?
Používateľ stratí prehľad o zariadení.

     Získavanie dát na pozadí.
     Súhlasil s tým používateľ?
Široké spektrum zariadení


   Rozdielne rozlíšenie, hardvér,
           konfigurácia.

Dizajn aplikácie, tak aby podporovala
         všetky zariadenia.

    I18N už na začiatku vývoja.

       Resource framework.
Dizajn


          UI dizajnér

Škálovateľná vektorová grafika.

   Nezávislosť na rozlíšení.

  Device Independent Pixels
Zdieľanie údajov




Viac aplikácii má prístup
   k rovnakým dátam.

intent filter: city://zilina/
Services


Reštart na pozadí.

Background service

Foreground service

    stopSelf()
Alarm


         Event driven app

          Intent reciever

Alarm beží aj keď aplikácia nebeží.

         Inexact alarm
posun alarmov – vykonanie naraz
Zápis a čítanie


      FS: yaffs2

    Zápis je drahý.

Rýchlosť práce s diskom
klesá s jeho obsadením.

 Emulátor má omnoho         Graf z Google IO

    rýchlejšie IO!
Mobilné testovanie



        Citát klasika:

„Bez peněz do hospody nelez.“

 „Bez testů do vývoje nelez.“
Adobe Device Central




      Flash aplikácie
väčšina mobilných platforiem
Android Emulátor




Iba Android platforma
Perfecto Mobile



Test na reálnych zariadeniach.

     VNC-like pripojenie

  http://perfectomobile.com/
Device Anywhere




http://www.deviceanywhere.com/
Marketplace

           Percento z predaja

              Android Market
       https://market.android.com/

            Adobe Marketplace
http://www.adobe.com/cfusion/marketplace/

             Intel Marketplace
 http://www.appup.com/applications/index
WebGL Earth




http://www.webglearth.com
Jenkins




Continuous Integration – http://ci.sinusgear.com
Otázky?
Ďakujem za pozornosť

             FRI ŽU
             SOIT.sk
              Žilina
            24.2. 2011


          Juraj Michálek

Twitter: http://twitter.com/georgiksk
Blog: http://georgik.sinusgear.com

More Related Content

Similar to Vývoj pre Google Android

Computer graphics on web and in mobile devices
Computer graphics on web and in mobile devicesComputer graphics on web and in mobile devices
Computer graphics on web and in mobile devicesLukas Tencer
 
The New Distrowatch – Bachelor's thesis (SK)
The New Distrowatch – Bachelor's thesis (SK)The New Distrowatch – Bachelor's thesis (SK)
The New Distrowatch – Bachelor's thesis (SK)Jakub Žitný
 
Require.JS & Backbone.JS
Require.JS & Backbone.JSRequire.JS & Backbone.JS
Require.JS & Backbone.JSsrigi
 
SecureCam Program Guide
SecureCam Program GuideSecureCam Program Guide
SecureCam Program Guideguest146c167
 
Deltacloud Presentation OpenHouse 2010
Deltacloud Presentation OpenHouse 2010Deltacloud Presentation OpenHouse 2010
Deltacloud Presentation OpenHouse 2010Michal Fojtik
 
Matúš Jančík: Programuj rýchlejšie, meraj presnejšie
Matúš Jančík: Programuj rýchlejšie, meraj presnejšieMatúš Jančík: Programuj rýchlejšie, meraj presnejšie
Matúš Jančík: Programuj rýchlejšie, meraj presnejšieMichal Chabada
 
Využití technologií google maps a GPS pro dopravní informace
Využití technologií google maps a GPS pro dopravní informaceVyužití technologií google maps a GPS pro dopravní informace
Využití technologií google maps a GPS pro dopravní informaceTomáš Mahrík
 
Open Source Gis Zilina 2009
Open Source Gis Zilina 2009Open Source Gis Zilina 2009
Open Source Gis Zilina 2009guest4255e6
 
Hudson CI, Maven, FlexMojos
Hudson CI, Maven, FlexMojosHudson CI, Maven, FlexMojos
Hudson CI, Maven, FlexMojosJuraj Michálek
 
Cucumber - Testovanie webových aplikácií
Cucumber - Testovanie webových aplikáciíCucumber - Testovanie webových aplikácií
Cucumber - Testovanie webových aplikáciíPeter Študent
 

Similar to Vývoj pre Google Android (20)

Computer graphics on web and in mobile devices
Computer graphics on web and in mobile devicesComputer graphics on web and in mobile devices
Computer graphics on web and in mobile devices
 
PlatformIO - Namakané Arduino IDE
PlatformIO - Namakané Arduino IDEPlatformIO - Namakané Arduino IDE
PlatformIO - Namakané Arduino IDE
 
Moscrif vc-3
Moscrif vc-3Moscrif vc-3
Moscrif vc-3
 
Moscrif vc-3
Moscrif vc-3Moscrif vc-3
Moscrif vc-3
 
The New Distrowatch – Bachelor's thesis (SK)
The New Distrowatch – Bachelor's thesis (SK)The New Distrowatch – Bachelor's thesis (SK)
The New Distrowatch – Bachelor's thesis (SK)
 
Require.JS & Backbone.JS
Require.JS & Backbone.JSRequire.JS & Backbone.JS
Require.JS & Backbone.JS
 
SecureCam Program Guide
SecureCam Program GuideSecureCam Program Guide
SecureCam Program Guide
 
Deltacloud Presentation OpenHouse 2010
Deltacloud Presentation OpenHouse 2010Deltacloud Presentation OpenHouse 2010
Deltacloud Presentation OpenHouse 2010
 
rrr
rrrrrr
rrr
 
Android libraries
Android librariesAndroid libraries
Android libraries
 
Matúš Jančík: Programuj rýchlejšie, meraj presnejšie
Matúš Jančík: Programuj rýchlejšie, meraj presnejšieMatúš Jančík: Programuj rýchlejšie, meraj presnejšie
Matúš Jančík: Programuj rýchlejšie, meraj presnejšie
 
Využití technologií google maps a GPS pro dopravní informace
Využití technologií google maps a GPS pro dopravní informaceVyužití technologií google maps a GPS pro dopravní informace
Využití technologií google maps a GPS pro dopravní informace
 
Open Source Gis Zilina 2009
Open Source Gis Zilina 2009Open Source Gis Zilina 2009
Open Source Gis Zilina 2009
 
Hudson CI, Maven, FlexMojos
Hudson CI, Maven, FlexMojosHudson CI, Maven, FlexMojos
Hudson CI, Maven, FlexMojos
 
Prečo symfony2 framework
Prečo symfony2 frameworkPrečo symfony2 framework
Prečo symfony2 framework
 
Kpi 207941
Kpi 207941Kpi 207941
Kpi 207941
 
Kpi 207941
Kpi 207941Kpi 207941
Kpi 207941
 
Cucumber - Testovanie webových aplikácií
Cucumber - Testovanie webových aplikáciíCucumber - Testovanie webových aplikácií
Cucumber - Testovanie webových aplikácií
 
347471_zaverecny_ukol
347471_zaverecny_ukol347471_zaverecny_ukol
347471_zaverecny_ukol
 
C#
C#C#
C#
 

More from Juraj Michálek

Rust Embedded Development on ESP32 and basics of Async with Embassy
Rust Embedded Development on ESP32 and basics of Async with EmbassyRust Embedded Development on ESP32 and basics of Async with Embassy
Rust Embedded Development on ESP32 and basics of Async with EmbassyJuraj Michálek
 
Embedded Development on ESP32 - FEKT VUT - UREL
Embedded Development on ESP32 - FEKT VUT - URELEmbedded Development on ESP32 - FEKT VUT - UREL
Embedded Development on ESP32 - FEKT VUT - URELJuraj Michálek
 
Embedded Rust on ESP2 - Rust Linz
Embedded Rust on ESP2 - Rust LinzEmbedded Rust on ESP2 - Rust Linz
Embedded Rust on ESP2 - Rust LinzJuraj Michálek
 
How Open Source Community and Espressif made it possible to use Rust language...
How Open Source Community and Espressif made it possible to use Rust language...How Open Source Community and Espressif made it possible to use Rust language...
How Open Source Community and Espressif made it possible to use Rust language...Juraj Michálek
 
C language in our world 2019
C language in our world 2019C language in our world 2019
C language in our world 2019Juraj Michálek
 
C language in our world 2017
C language in our world 2017C language in our world 2017
C language in our world 2017Juraj Michálek
 
Continuous Delivery - FIT VUT
Continuous Delivery - FIT VUTContinuous Delivery - FIT VUT
Continuous Delivery - FIT VUTJuraj Michálek
 
C language in our world 2016
C language in our world 2016C language in our world 2016
C language in our world 2016Juraj Michálek
 
C++ and Software Engineering 2015
C++ and Software Engineering 2015C++ and Software Engineering 2015
C++ and Software Engineering 2015Juraj Michálek
 
C language in our world 2015
C language in our world 2015C language in our world 2015
C language in our world 2015Juraj Michálek
 
Bigger & Better RnD - GeeCON.cz 2014
Bigger & Better RnD - GeeCON.cz 2014Bigger & Better RnD - GeeCON.cz 2014
Bigger & Better RnD - GeeCON.cz 2014Juraj Michálek
 
Gradle and build systems for C language
Gradle and build systems for C languageGradle and build systems for C language
Gradle and build systems for C languageJuraj Michálek
 
The story behind PF2014 - Cordova
The story behind PF2014 - CordovaThe story behind PF2014 - Cordova
The story behind PF2014 - CordovaJuraj Michálek
 
PowerShell from *nix user perspective
PowerShell from *nix user perspectivePowerShell from *nix user perspective
PowerShell from *nix user perspectiveJuraj Michálek
 
Ať se z kódu nepráší! 2013
Ať se z kódu nepráší! 2013Ať se z kódu nepráší! 2013
Ať se z kódu nepráší! 2013Juraj Michálek
 

More from Juraj Michálek (20)

Rust Embedded Development on ESP32 and basics of Async with Embassy
Rust Embedded Development on ESP32 and basics of Async with EmbassyRust Embedded Development on ESP32 and basics of Async with Embassy
Rust Embedded Development on ESP32 and basics of Async with Embassy
 
Embedded Development on ESP32 - FEKT VUT - UREL
Embedded Development on ESP32 - FEKT VUT - URELEmbedded Development on ESP32 - FEKT VUT - UREL
Embedded Development on ESP32 - FEKT VUT - UREL
 
Embedded Rust on ESP2 - Rust Linz
Embedded Rust on ESP2 - Rust LinzEmbedded Rust on ESP2 - Rust Linz
Embedded Rust on ESP2 - Rust Linz
 
How Open Source Community and Espressif made it possible to use Rust language...
How Open Source Community and Espressif made it possible to use Rust language...How Open Source Community and Espressif made it possible to use Rust language...
How Open Source Community and Espressif made it possible to use Rust language...
 
C language in our world 2019
C language in our world 2019C language in our world 2019
C language in our world 2019
 
C language in our world 2017
C language in our world 2017C language in our world 2017
C language in our world 2017
 
Continuous Delivery - FIT VUT
Continuous Delivery - FIT VUTContinuous Delivery - FIT VUT
Continuous Delivery - FIT VUT
 
C language in our world 2016
C language in our world 2016C language in our world 2016
C language in our world 2016
 
Story behind PF 2016
Story behind PF 2016Story behind PF 2016
Story behind PF 2016
 
C++ and Software Engineering 2015
C++ and Software Engineering 2015C++ and Software Engineering 2015
C++ and Software Engineering 2015
 
C language in our world 2015
C language in our world 2015C language in our world 2015
C language in our world 2015
 
C++ in our world
C++ in our worldC++ in our world
C++ in our world
 
Bigger & Better RnD - GeeCON.cz 2014
Bigger & Better RnD - GeeCON.cz 2014Bigger & Better RnD - GeeCON.cz 2014
Bigger & Better RnD - GeeCON.cz 2014
 
Gradle and build systems for C language
Gradle and build systems for C languageGradle and build systems for C language
Gradle and build systems for C language
 
The story behind PF2014 - Cordova
The story behind PF2014 - CordovaThe story behind PF2014 - Cordova
The story behind PF2014 - Cordova
 
There is more to C 2013
There is more to C 2013There is more to C 2013
There is more to C 2013
 
PowerShell UIAtomation
PowerShell UIAtomationPowerShell UIAtomation
PowerShell UIAtomation
 
PowerShell from *nix user perspective
PowerShell from *nix user perspectivePowerShell from *nix user perspective
PowerShell from *nix user perspective
 
Ať se z kódu nepráší! 2013
Ať se z kódu nepráší! 2013Ať se z kódu nepráší! 2013
Ať se z kódu nepráší! 2013
 
There is more to C
There is more to CThere is more to C
There is more to C
 

Vývoj pre Google Android