SlideShare uma empresa Scribd logo
1 de 53
             Introduction à Android by Jean Collas, Ghislain Deffrasne, Reda Sebbaniis licensed under a Creative Commons Attribution 2.0 France License.  Original at http://www.jean-collas.fr/android
 Ouverture Jean Collas, Réda Sebbani, Ghislain Deffrasnes
Contexte Contexte 3 Téléphonie Mobile : Smart Phone Développement logiciel pour mobiles Chiffre d’affaire énorme Windows Mobile RIM 40 millions de smartphones / trimestre (2008) Symbian iPhone OS
Contexte Concurrentiel 4 Systèmes d’exploitation pour Mobiles : Marché en constante augmentation Possibilités d’évolution énormes avec un bon produit
Contexte Concurrentiel 5 Systèmes d’exploitation pour Smart phone : Marché en constante augmentation (+28% en 1 an, 31M -> 40M) Possibilités d’évolution énormes avec un bon produit
Internet & Google 6 Fondé en 98, croissance constante Multiples domaines de l’informatique : Recherche, cartographie, vidéo, conception 3D, suite  bureautique, publicité, navigateur, … Politique de financement par la publicité Attaque du monde mobile par la source :  le système d’exploitation Android
Points forts d’Android Points fort d’Android 7 Point de vue constructeur Point de vue utilisateur Point de vue développeur Point de vue bidouilleur Système Linux + Java Système fonctionnel, intuitif, évolutif Application développées en syntaxe Java SDK complet fourni Projet Open Source  C++ / Java
Historique Historique 8 T-Mobile G1 Novembre 2008 Android 1.0 et SDK release 2 Android : Open Source Octobre 2008 Android 1.0 et SDK release 1 Septembre 2008 AndroidMarket Août 2008 Avril 2008 Développement d’Android Developer Challenge Open Handset Alliance Annonce d’Android SDK pour Android Novembre 2007 Start-up Android Août 2005
Open Handset Alliance 9 ,[object Object]
47 compagniesFabricants de semi-conducteurs Opérateurs de téléphonie mobile Entreprises de commercialisation Fabricants d'appareils mobiles Fabricants de logiciels ,[object Object],[object Object]
De 180 à 400 $
Wi-fi et Bluetooth
GPS
Accéléromètres
Caméra
Écran tactile,[object Object]
Matériel Recommandé 12 ,[object Object]
  Mémoire Flash : 256 Mo (minimum requis)
  Wifi : 802.11 b/g
  USB : interface USB 2.0
  Bluetooth 2.0 EDR
  Caméra
  Périphérique de stockage externe
  Écran :
  Résolution HVGA (480 × 320 pixels)
  Couleurs 16 bits,[object Object]
Développementd’Applications 14   Possibilité de créer ses propres applications Environnement de développement Android SDK   Plugin Eclipse   Émulateur, outils de débuggage, etc…   Langage Java ?
Intégration des applications Google 15   Barre de recherche « Google Search » Gmail   Google Talk (IM)   Navigateur Web Gmaps   Google StreetView
Exemples d’applications : Android Market 16 Géolocalisation Orientation Tourisme Géolocalisation Travail Voisinage Google Maps Voyage Achats Covoiturage
Points d’accès d’Android 17 Point de vue constructeur Point de vue utilisateur Point de vue développeur Point de vue bidouilleur Système Linux + Java Système fonctionnel, intuitif, évolutif Application développées en syntaxe Java SDK complet fourni Projet Open Source  C++ / Java
Architecture 18 APPLICATIONS Home Contacts Phone Browser … APPLICATION FRAMEWORK Activity Manager Window Manager Content Providers View System Package Manager Telephony Manager Resource Manager Location Manager Notification Manager ANDROID RUNTIME JNI LIBRARIES CoreLibraries Surface Manager Media Framework SQL Lite Dalvik Virtual Machine OpenGL Audio Manager WebKit SGL SSL Libc LINUX KERNEL Display Driver Camera Driver Flash Memory Driver Binder (IPC) Driver Keypad Driver WiFi Driver Audio Driver Power Management
Noyau d’Android 19 Architecture ARM Basé sur Linux 2.6.24 Système de fichiers supporté : FAT32   Support de TCP/IP, UDP,… HARDWARE ABSTRACTION LAYER Graphics Audio Camera Bluetooth GPS WiFi … LINUX KERNEL Display Driver Camera Driver Flash Memory Driver Binder (IPC) Driver Keypad Driver WiFi Driver Audio Driver Power Management
Adaptation aux besoins du mobile 20 ,[object Object]
Ashmem : partage de mémoire entre processus
Binder : driver IPC pour la communication inter-processus
Power Management
Low Memory Killer
Kernel Debugger
LoggerHARDWARE ABSTRACTION LAYER Graphics Audio Camera Bluetooth GPS WiFi … LINUX KERNEL Display Driver Camera Driver Flash Memory Driver Binder (IPC) Driver Keypad Driver WiFi Driver Audio Driver Power Management
Librairies 21 LIBRARIES Surface Manager Media Framework SQL Lite OpenGL Audio Manager WebKit SGL SSL Libc LINUX KERNEL Display Driver Camera Driver Flash Memory Driver Binder (IPC) Driver Keypad Driver WiFi Driver Audio Driver Power Management
Surface Manager 22 Application 1 Surface Flinger Application 2 Écran (Frame Buffer)
Audio Manager 23 Sonnerie d’appel Audio Flinger Oreillette Lecteur MP3 Écouteurs
Machine Virtuelle Dalvik 24 ANDROID RUNTIME LIBRARIES CoreLibraries Surface Manager Media Framework SQL Lite Dalvik Virtual Machine OpenGL Audio Manager WebKit SGL SSL Libc LINUX KERNEL Display Driver Camera Driver Flash Memory Driver Binder (IPC) Driver Keypad Driver WiFi Driver Audio Driver Power Management
Machine Virtuelle Dalvik 25 Nouvelle instance pour chaque processus : Applications indépendantes   Exécute des fichiers .dex (Dalvik Executable) Dalvik core class library fournit une base de développement proche  de java SE, adapté au mobile
Framework & fondationsdes applications 26 APPLICATION FRAMEWORK Activity Manager Window Manager Content Providers View System Package Manager Telephony Manager Resource Manager Location Manager Notification Manager ANDROID RUNTIME JNI LIBRARIES CoreLibraries Surface Manager Media Framework SQL Lite Dalvik Virtual Machine OpenGL Audio Manager WebKit SGL SSL Libc LINUX KERNEL Display Driver Camera Driver Flash Memory Driver Binder (IPC) Driver Keypad Driver WiFi Driver Audio Driver Power Management
Intents 27  Intent : ,[object Object]
  Fait le lien entre différentes applications  Décrit par : ,[object Object]
  La donnée à traiter (sous forme d’URI)Types d’Intent : ,[object Object]
  Implicite (description),[object Object]
29 Intent Filter Objectif : Description du handler Publication d’IntentFilters par les activités IntentFilter décrivent les capacités de l’application. <intent-filter>    <actionandroid:value="android.intent.action.VIEW"/>    <actionandroid:value="android.intent.action.EDIT"/>    <actionandroid:value="android.intent.action.PICK"/>    <category android:value="android.intent.category.DEFAULT" />    <type      android:value="vnd.android.cursor.dir/vnd.google.contact" /> </intent-filter>
Les URIs - Utilisation 30 Exemples d’URI: Intent EDIT_ACTION Ouvre l’application de géo-localisation à la position donnée (latitude, longitude). VIEW_ACTION geo: tel: 125 people/ content: google.streetview: //contacts/ 25,32 123 cbll=25,32 Appelle le numéro 123 CALL_ACTION VIEW_ACTION &cbp=1,yaw,,pitch,zoom void startActivity(Intent intent) ; void sendBroadcast(Intent intent)boolean bindService(Intent service, int flags) ComponentName startService(Intent service)
Notification Manager 31 Applications peuvent s’exécuter simultanément Barre de notifications Notificationsd’événements du background Mise en place facilité par le Notification Manager Différentes formes de notifications : ,[object Object]
  Son

Mais conteúdo relacionado

Mais procurados

Ch1. Développement mobile
Ch1. Développement mobileCh1. Développement mobile
Ch1. Développement mobileHaifa Chorfi
 
Workshop android
Workshop androidWorkshop android
Workshop android'Med Douik
 
Ch2. Développement mobile
Ch2. Développement mobileCh2. Développement mobile
Ch2. Développement mobileHaifa Chorfi
 
Niji x mobile mots flash
Niji x mobile   mots flashNiji x mobile   mots flash
Niji x mobile mots flashGabriel DUPONT
 
L’open-source au cœur des magasins d’applications
L’open-source au cœur des magasins d’applicationsL’open-source au cœur des magasins d’applications
L’open-source au cœur des magasins d’applicationsLaFrenchMobile
 
Présentation développement application Android
Présentation développement application AndroidPrésentation développement application Android
Présentation développement application Androidambin_fr
 
Hackathon Android Abidjan
Hackathon Android  AbidjanHackathon Android  Abidjan
Hackathon Android AbidjanBacely YoroBi
 
Présentation de la plateforme Android
Présentation de la plateforme AndroidPrésentation de la plateforme Android
Présentation de la plateforme AndroidMohamed BOURAOUI
 
Plateformes de développement d’applications mobiles
Plateformes de développement d’applications mobilesPlateformes de développement d’applications mobiles
Plateformes de développement d’applications mobilesEric Toguem
 
Présentation et Initiative pour le développement Android
Présentation et Initiative pour le développement AndroidPrésentation et Initiative pour le développement Android
Présentation et Initiative pour le développement Androidyounes ben tlili
 
Choisir sa plateforme de développement mobile
Choisir sa plateforme de développement mobileChoisir sa plateforme de développement mobile
Choisir sa plateforme de développement mobileSQLI DIGITAL EXPERIENCE
 

Mais procurados (12)

Android
AndroidAndroid
Android
 
Ch1. Développement mobile
Ch1. Développement mobileCh1. Développement mobile
Ch1. Développement mobile
 
Workshop android
Workshop androidWorkshop android
Workshop android
 
Ch2. Développement mobile
Ch2. Développement mobileCh2. Développement mobile
Ch2. Développement mobile
 
Niji x mobile mots flash
Niji x mobile   mots flashNiji x mobile   mots flash
Niji x mobile mots flash
 
L’open-source au cœur des magasins d’applications
L’open-source au cœur des magasins d’applicationsL’open-source au cœur des magasins d’applications
L’open-source au cœur des magasins d’applications
 
Présentation développement application Android
Présentation développement application AndroidPrésentation développement application Android
Présentation développement application Android
 
Hackathon Android Abidjan
Hackathon Android  AbidjanHackathon Android  Abidjan
Hackathon Android Abidjan
 
Présentation de la plateforme Android
Présentation de la plateforme AndroidPrésentation de la plateforme Android
Présentation de la plateforme Android
 
Plateformes de développement d’applications mobiles
Plateformes de développement d’applications mobilesPlateformes de développement d’applications mobiles
Plateformes de développement d’applications mobiles
 
Présentation et Initiative pour le développement Android
Présentation et Initiative pour le développement AndroidPrésentation et Initiative pour le développement Android
Présentation et Initiative pour le développement Android
 
Choisir sa plateforme de développement mobile
Choisir sa plateforme de développement mobileChoisir sa plateforme de développement mobile
Choisir sa plateforme de développement mobile
 

Semelhante a Presentation Android

Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)
Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)
Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)Stéphane Rouilly
 
Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)
Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)
Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)Stéphane Rouilly
 
SophiaConf 2010 Présentation de la conférence du 05 Juillet - Android :Tout s...
SophiaConf 2010 Présentation de la conférence du 05 Juillet - Android :Tout s...SophiaConf 2010 Présentation de la conférence du 05 Juillet - Android :Tout s...
SophiaConf 2010 Présentation de la conférence du 05 Juillet - Android :Tout s...TelecomValley
 
LES MATERIELS ANDROID
LES MATERIELS ANDROIDLES MATERIELS ANDROID
LES MATERIELS ANDROIDTiyab K.
 
Développement d'applications mobiles.. Environnement de programmation visuelle
Développement d'applications mobiles.. Environnement de programmation visuelleDéveloppement d'applications mobiles.. Environnement de programmation visuelle
Développement d'applications mobiles.. Environnement de programmation visuelleREGIONAL ACADEMY OF EDUCATION AND TRAINING
 
LOGIC INSTRUMENT Présentation Français - Jan. 2014
LOGIC INSTRUMENT Présentation Français - Jan. 2014LOGIC INSTRUMENT Présentation Français - Jan. 2014
LOGIC INSTRUMENT Présentation Français - Jan. 2014Daniel Schroeder
 
Introduction à Android - Mars 2012
Introduction à Android - Mars 2012Introduction à Android - Mars 2012
Introduction à Android - Mars 2012Aurélien Guillard
 
Android pour les debutants
Android pour les debutantsAndroid pour les debutants
Android pour les debutantsAmira Hakim
 
Windows Phone 8 for Business - Developer Talks
Windows Phone 8 for Business - Developer TalksWindows Phone 8 for Business - Developer Talks
Windows Phone 8 for Business - Developer TalksJean-Sébastien Dupuy
 
Présentation écosystème mobile
Présentation écosystème mobilePrésentation écosystème mobile
Présentation écosystème mobileguest28b3ded
 
Cahier Windows Phone 7 par Programmez
Cahier Windows Phone 7 par ProgrammezCahier Windows Phone 7 par Programmez
Cahier Windows Phone 7 par Programmezaemond
 
Les secrets du développement d'une application mobile
Les secrets du développement d'une application mobileLes secrets du développement d'une application mobile
Les secrets du développement d'une application mobileEutech SSII
 
Presentation cgt juin2010
Presentation cgt juin2010Presentation cgt juin2010
Presentation cgt juin2010Pascal Poty
 
Chapitre 1-introduction-plateforme-android
Chapitre 1-introduction-plateforme-androidChapitre 1-introduction-plateforme-android
Chapitre 1-introduction-plateforme-androidSalah Gharbi
 
chapitre-1-introduction-plateforme-android (2).pdf
chapitre-1-introduction-plateforme-android (2).pdfchapitre-1-introduction-plateforme-android (2).pdf
chapitre-1-introduction-plateforme-android (2).pdfolfaharrabi2
 
Présentation android
Présentation androidPrésentation android
Présentation androiddiop5
 
Codes Barres 2D et 1D : Outils Marketing puissants
Codes Barres 2D et 1D : Outils Marketing puissantsCodes Barres 2D et 1D : Outils Marketing puissants
Codes Barres 2D et 1D : Outils Marketing puissantsHenri Kaufman
 

Semelhante a Presentation Android (20)

Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)
Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)
Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)
 
Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)
Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)
Cours mobiles du Mastère CPM 2011 (Telecom ParisTech/INA)
 
SophiaConf 2010 Présentation de la conférence du 05 Juillet - Android :Tout s...
SophiaConf 2010 Présentation de la conférence du 05 Juillet - Android :Tout s...SophiaConf 2010 Présentation de la conférence du 05 Juillet - Android :Tout s...
SophiaConf 2010 Présentation de la conférence du 05 Juillet - Android :Tout s...
 
LES MATERIELS ANDROID
LES MATERIELS ANDROIDLES MATERIELS ANDROID
LES MATERIELS ANDROID
 
Développement d'applications mobiles.. Environnement de programmation visuelle
Développement d'applications mobiles.. Environnement de programmation visuelleDéveloppement d'applications mobiles.. Environnement de programmation visuelle
Développement d'applications mobiles.. Environnement de programmation visuelle
 
LOGIC INSTRUMENT Présentation Français - Jan. 2014
LOGIC INSTRUMENT Présentation Français - Jan. 2014LOGIC INSTRUMENT Présentation Français - Jan. 2014
LOGIC INSTRUMENT Présentation Français - Jan. 2014
 
Android 1
Android 1Android 1
Android 1
 
Introduction à Android - Mars 2012
Introduction à Android - Mars 2012Introduction à Android - Mars 2012
Introduction à Android - Mars 2012
 
Android pour les debutants
Android pour les debutantsAndroid pour les debutants
Android pour les debutants
 
Windows Phone 8 for Business - Developer Talks
Windows Phone 8 for Business - Developer TalksWindows Phone 8 for Business - Developer Talks
Windows Phone 8 for Business - Developer Talks
 
Présentation écosystème mobile
Présentation écosystème mobilePrésentation écosystème mobile
Présentation écosystème mobile
 
Windows Phone 8 et la sécurité
Windows Phone 8 et la sécuritéWindows Phone 8 et la sécurité
Windows Phone 8 et la sécurité
 
Cahier Windows Phone 7 par Programmez
Cahier Windows Phone 7 par ProgrammezCahier Windows Phone 7 par Programmez
Cahier Windows Phone 7 par Programmez
 
Les secrets du développement d'une application mobile
Les secrets du développement d'une application mobileLes secrets du développement d'une application mobile
Les secrets du développement d'une application mobile
 
Presentation cgt juin2010
Presentation cgt juin2010Presentation cgt juin2010
Presentation cgt juin2010
 
Chapitre 1-introduction-plateforme-android
Chapitre 1-introduction-plateforme-androidChapitre 1-introduction-plateforme-android
Chapitre 1-introduction-plateforme-android
 
chapitre-1-introduction-plateforme-android (2).pdf
chapitre-1-introduction-plateforme-android (2).pdfchapitre-1-introduction-plateforme-android (2).pdf
chapitre-1-introduction-plateforme-android (2).pdf
 
Présentation android
Présentation androidPrésentation android
Présentation android
 
Revue de presse mwc 2012
Revue de presse mwc 2012Revue de presse mwc 2012
Revue de presse mwc 2012
 
Codes Barres 2D et 1D : Outils Marketing puissants
Codes Barres 2D et 1D : Outils Marketing puissantsCodes Barres 2D et 1D : Outils Marketing puissants
Codes Barres 2D et 1D : Outils Marketing puissants
 

Presentation Android

  • 1.              Introduction à Android by Jean Collas, Ghislain Deffrasne, Reda Sebbaniis licensed under a Creative Commons Attribution 2.0 France License. Original at http://www.jean-collas.fr/android
  • 2. Ouverture Jean Collas, Réda Sebbani, Ghislain Deffrasnes
  • 3. Contexte Contexte 3 Téléphonie Mobile : Smart Phone Développement logiciel pour mobiles Chiffre d’affaire énorme Windows Mobile RIM 40 millions de smartphones / trimestre (2008) Symbian iPhone OS
  • 4. Contexte Concurrentiel 4 Systèmes d’exploitation pour Mobiles : Marché en constante augmentation Possibilités d’évolution énormes avec un bon produit
  • 5. Contexte Concurrentiel 5 Systèmes d’exploitation pour Smart phone : Marché en constante augmentation (+28% en 1 an, 31M -> 40M) Possibilités d’évolution énormes avec un bon produit
  • 6. Internet & Google 6 Fondé en 98, croissance constante Multiples domaines de l’informatique : Recherche, cartographie, vidéo, conception 3D, suite bureautique, publicité, navigateur, … Politique de financement par la publicité Attaque du monde mobile par la source : le système d’exploitation Android
  • 7. Points forts d’Android Points fort d’Android 7 Point de vue constructeur Point de vue utilisateur Point de vue développeur Point de vue bidouilleur Système Linux + Java Système fonctionnel, intuitif, évolutif Application développées en syntaxe Java SDK complet fourni Projet Open Source C++ / Java
  • 8. Historique Historique 8 T-Mobile G1 Novembre 2008 Android 1.0 et SDK release 2 Android : Open Source Octobre 2008 Android 1.0 et SDK release 1 Septembre 2008 AndroidMarket Août 2008 Avril 2008 Développement d’Android Developer Challenge Open Handset Alliance Annonce d’Android SDK pour Android Novembre 2007 Start-up Android Août 2005
  • 9.
  • 10.
  • 11. De 180 à 400 $
  • 13. GPS
  • 16.
  • 17.
  • 18. Mémoire Flash : 256 Mo (minimum requis)
  • 19. Wifi : 802.11 b/g
  • 20. USB : interface USB 2.0
  • 21. Bluetooth 2.0 EDR
  • 23. Périphérique de stockage externe
  • 25. Résolution HVGA (480 × 320 pixels)
  • 26.
  • 27. Développementd’Applications 14 Possibilité de créer ses propres applications Environnement de développement Android SDK Plugin Eclipse Émulateur, outils de débuggage, etc… Langage Java ?
  • 28. Intégration des applications Google 15 Barre de recherche « Google Search » Gmail Google Talk (IM) Navigateur Web Gmaps Google StreetView
  • 29. Exemples d’applications : Android Market 16 Géolocalisation Orientation Tourisme Géolocalisation Travail Voisinage Google Maps Voyage Achats Covoiturage
  • 30. Points d’accès d’Android 17 Point de vue constructeur Point de vue utilisateur Point de vue développeur Point de vue bidouilleur Système Linux + Java Système fonctionnel, intuitif, évolutif Application développées en syntaxe Java SDK complet fourni Projet Open Source C++ / Java
  • 31. Architecture 18 APPLICATIONS Home Contacts Phone Browser … APPLICATION FRAMEWORK Activity Manager Window Manager Content Providers View System Package Manager Telephony Manager Resource Manager Location Manager Notification Manager ANDROID RUNTIME JNI LIBRARIES CoreLibraries Surface Manager Media Framework SQL Lite Dalvik Virtual Machine OpenGL Audio Manager WebKit SGL SSL Libc LINUX KERNEL Display Driver Camera Driver Flash Memory Driver Binder (IPC) Driver Keypad Driver WiFi Driver Audio Driver Power Management
  • 32. Noyau d’Android 19 Architecture ARM Basé sur Linux 2.6.24 Système de fichiers supporté : FAT32 Support de TCP/IP, UDP,… HARDWARE ABSTRACTION LAYER Graphics Audio Camera Bluetooth GPS WiFi … LINUX KERNEL Display Driver Camera Driver Flash Memory Driver Binder (IPC) Driver Keypad Driver WiFi Driver Audio Driver Power Management
  • 33.
  • 34. Ashmem : partage de mémoire entre processus
  • 35. Binder : driver IPC pour la communication inter-processus
  • 39. LoggerHARDWARE ABSTRACTION LAYER Graphics Audio Camera Bluetooth GPS WiFi … LINUX KERNEL Display Driver Camera Driver Flash Memory Driver Binder (IPC) Driver Keypad Driver WiFi Driver Audio Driver Power Management
  • 40. Librairies 21 LIBRARIES Surface Manager Media Framework SQL Lite OpenGL Audio Manager WebKit SGL SSL Libc LINUX KERNEL Display Driver Camera Driver Flash Memory Driver Binder (IPC) Driver Keypad Driver WiFi Driver Audio Driver Power Management
  • 41. Surface Manager 22 Application 1 Surface Flinger Application 2 Écran (Frame Buffer)
  • 42. Audio Manager 23 Sonnerie d’appel Audio Flinger Oreillette Lecteur MP3 Écouteurs
  • 43. Machine Virtuelle Dalvik 24 ANDROID RUNTIME LIBRARIES CoreLibraries Surface Manager Media Framework SQL Lite Dalvik Virtual Machine OpenGL Audio Manager WebKit SGL SSL Libc LINUX KERNEL Display Driver Camera Driver Flash Memory Driver Binder (IPC) Driver Keypad Driver WiFi Driver Audio Driver Power Management
  • 44. Machine Virtuelle Dalvik 25 Nouvelle instance pour chaque processus : Applications indépendantes Exécute des fichiers .dex (Dalvik Executable) Dalvik core class library fournit une base de développement proche de java SE, adapté au mobile
  • 45. Framework & fondationsdes applications 26 APPLICATION FRAMEWORK Activity Manager Window Manager Content Providers View System Package Manager Telephony Manager Resource Manager Location Manager Notification Manager ANDROID RUNTIME JNI LIBRARIES CoreLibraries Surface Manager Media Framework SQL Lite Dalvik Virtual Machine OpenGL Audio Manager WebKit SGL SSL Libc LINUX KERNEL Display Driver Camera Driver Flash Memory Driver Binder (IPC) Driver Keypad Driver WiFi Driver Audio Driver Power Management
  • 46.
  • 47.
  • 48.
  • 49.
  • 50. 29 Intent Filter Objectif : Description du handler Publication d’IntentFilters par les activités IntentFilter décrivent les capacités de l’application. <intent-filter> <actionandroid:value="android.intent.action.VIEW"/> <actionandroid:value="android.intent.action.EDIT"/> <actionandroid:value="android.intent.action.PICK"/> <category android:value="android.intent.category.DEFAULT" /> <type android:value="vnd.android.cursor.dir/vnd.google.contact" /> </intent-filter>
  • 51. Les URIs - Utilisation 30 Exemples d’URI: Intent EDIT_ACTION Ouvre l’application de géo-localisation à la position donnée (latitude, longitude). VIEW_ACTION geo: tel: 125 people/ content: google.streetview: //contacts/ 25,32 123 cbll=25,32 Appelle le numéro 123 CALL_ACTION VIEW_ACTION &cbp=1,yaw,,pitch,zoom void startActivity(Intent intent) ; void sendBroadcast(Intent intent)boolean bindService(Intent service, int flags) ComponentName startService(Intent service)
  • 52.
  • 55.
  • 56. ContentProvider 33 SYSTEM APK APK service Activity service Activity Activity SQLite Data XML Remote data
  • 57. ContentProvider 34 SYSTEM APK APK service Activity service Activity Activity ContentProvider SQLite Data XML Remote data
  • 58. Les URIs 35 Exemples d’URI d’un content provider: Activity IntentReceiver Service Content Provider 125 people/ content: 53 users/ content: //contacts/ //com.maCompanie.monApp/ A Préfixe d’accès aux données, type d’URI B Identifiant ou type du content provider à consulter C 0 ou plusieurs segments, permettent de déterminer le type de données D Enregistrement spécifique éventuellement demandé (identifiant, référence) <providerclass=".NotePadProvider"android:authorities="com.google.provider.NotePad"/>
  • 59. ContentProvider 36 125 people/ content: URI : //contacts/ Activity IntentReceiver Content Providers Applications Service Content Provider URI Browser Annuaire Settings ContentResolver + delete() + insert() + notifyChange() + query() + update() Résultat Contacts Lecteur MP3 MediaStore.Images MediaStore.Audio
  • 60. Activity 37 Objet qui possède un cycle de vie Code qui réalise un traitement Activity IntentReceiver Point d’entrée d’une application Service Content Provider Généralement, uneActivityafficheune UI <activityclass=".NoteEditor"android:label="@string/title_note"> <intent-filterandroid:label="@string/resolve_edit"> <actionandroid:value="android.intent.action.VIEW"/> <actionandroid:value="android.intent.action.EDIT"/> <categoryandroid:value="android.intent.category.DEFAULT"/> <typeandroid:value="vnd.android.cursor.item/vnd.google.note"/> </intent-filter> </activity>
  • 61. Broadcast receiver 38 Broadcast receiver permet de réagir à des évènements extérieurs à l’application Activity BroadcastReceiver Service Content Provider . Permet de réveiller une application Un Intent peut être boadcasté; on peut utiliser un broadcast receiver pour gérer ce type d’evt Permet également de réagir à des notification du système (évènements extérieurs/matériels). <receiverandroid:name=".app.OneShotAlarm"android:process=":remote"/>  
  • 62. Service 39 Activity IntentReceiver Composante sans GUI Activité de longue durée Service Content Provider Service interne : Context.startService() Service externe : Context.bindService() Communication via une interface Ex Media Player : pause, lecture, stop, etc
  • 63. Service : AndroidManifest 40 Activity IntentReceiver <serviceandroid:name=".app.RemoteService"android:process=":remote"> <intent-filter> <!-- These are the interfaces supported by the service, which you can bind to. --> <actionandroid:name="com.example.android.apis.app.IRemoteService"/> <!-- This is an action code you can use to select the service without explicitly supplying the implementation class. --> <actionandroid:name="com.example.android.apis.app.REMOTE_SERVICE"/> </intent-filter> </service> Service Content Provider
  • 64. AndroidManifest complet 41 <manifestxmlns:android="http://schemas.android.com/apk/res/android" package="com.android.notepad"> <applicationandroid:icon="@drawable/app_notes"android:label="@string/app_name"> <activityclass=".NotesList"android:label="@string/title_notes_list"> <intent-filter> <actionandroid:value="android.intent.action.MAIN"/> <categoryandroid:value="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <providerclass=".NotePadProvider"android:authorities="com.google.provider.NotePad"/>  <serviceandroid:name=".app.RemoteService"android:process=":remote"> <intent-filter> <actionandroid:name="com.example.android.apis.app.IRemoteService"/> </intent-filter> </service> <receiverandroid:name=".app.OneShotAlarm"android:process=":remote"/> </application> </manifest> Activity IntentReceiver Activity Service Content Provider Content Provider Service IntentReceiver
  • 65.
  • 68. killed/shut downOnPause() Passage en arrière plan Stopped OnStop() Arrêt de l’exécution Killed OnDestroy() Libération des ressources
  • 69. Cycle de vie d’une Activité 43 Retour à l’application New Activity 1. OnCreate() 2. OnStart() 3. OnResume() Application Killed Running (Foreground) OnFreeze() OnPause() OnResume() Besoin de mémoire 3. OnResume() 2. OnStart() 1. OnRestart() Paused (Background) Application plus visible OnStop() Stopped (Plus visible) L’utilisateur quitte OnDestroy() Destroyed
  • 70. Hiérarchie des processus 44 Hiérarchie des processus ForegroundProcess Activité Importance Visible Process Activité en arrière plan Processus des composants « Service » disponibles en arrière plan Service Process Background Process Processus en arrière plan, non visible. EmptyProcess Cache pour les processus
  • 71. Les applications 45 APPLICATIONS Home Contacts Phone Browser … APPLICATION FRAMEWORK Activity Manager Window Manager Content Providers View System Package Manager Telephony Manager Resource Manager Location Manager Notification Manager ANDROID RUNTIME JNI LIBRARIES CoreLibraries Surface Manager Media Framework SQL Lite Dalvik Virtual Machine OpenGL Audio Manager WebKit SGL SSL Libc LINUX KERNEL Display Driver Camera Driver Flash Memory Driver Binder (IPC) Driver Keypad Driver WiFi Driver Audio Driver Power Management
  • 72. Développement en Java : Méthode classique 46 packagecom.android.hello;   import android.app.Activity; importandroid.os.Bundle; importandroid.widget.TextView;   publicclassHelloAndroidextends Activity { /**Calledwhentheactivityisfirstcreated.*/ @Override publicvoidonCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextViewtv = newTextView(this); tv.setText("Hello, Android"); setContentView(tv); } } HelloAndroid.java JAVA (uniquement) 1 champ de texte
  • 73. Séparation Présentation / Métier 47 packagecom.android.hello;   import android.app.Activity; importandroid.os.Bundle; importandroid.widget.TextView;   publicclassHelloAndroidextends Activity { /**Calledwhentheactivityisfirstcreated.*/ @Override publicvoidonCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } HelloAndroid.java JAVA métier <?xmlversion="1.0"encoding="utf-8"?> <TextViewxmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/hello"/> XML vues main.xml
  • 74. Interfaçage des ressources 48 Génération automatique Description du layout packagecom.android.hello;   publicfinalclass R { publicstaticfinalclassattr { } publicstaticfinalclassdrawable { publicstaticfinalint icon=0x7f020000; } publicstaticfinalclass layout { publicstaticfinalint main=0x7f030000; } publicstaticfinalclass string { publicstaticfinalintapp_name=0x7f040001; publicstaticfinalint hello=0x7f040000; } } R.java icon.png Image main.xml Description du layout strings.xml Étiquettes Texte
  • 75. HelloWorld : AndroidManifest.xml 49 <?xmlversion="1.0"encoding="utf-8"?> <manifestxmlns:android="http://schemas.android.com/apk/res/android" package="com.android.hello" android:versionCode="1" android:versionName="1.0.0"> <applicationandroid:icon="@drawable/icon"android:label="@string/app_name"> <activityandroid:name=".HelloAndroid" android:label="@string/app_name"> <intent-filter> <actionandroid:name="android.intent.action.MAIN"/> <categoryandroid:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application> </manifest>
  • 76. Compilation et Déploiement d’une Application 50 Byte-code (optimisé) Sources .dex .java .class .png .xml .apk /data/app/ Ressources + Manifest Application compilée
  • 78. Vidéos StreetView + Compass 52
  • 79. ? Vidéos StreetView + Compass 53
  • 80.
  • 81. Vidéo StreetView + Compass 55
  • 82. Vidéo StreetView + Compass 56
  • 83. 57 Symbian's chief technical advantage today is the platform's maturity, and more recently, its real-time kernel. ?
  • 84. Annexe 1 : Les partenaires de l’OpenHanset Alliance 58
  • 85. Cycle de vie d’une Activité 59 OnCreate() Retour à l’application Activity IntentReceiver OnStart() Service Content Provider Application killed OnResume() OnRestart() A refaire (diag d’états) Autre activité lancée Activité plus visible Passage au premier plan Passage au premier plan OnPause() Besoin de mémoire pour une application plus prioritaire OnStop() OnDestroy()
  • 86.
  • 87. IDL pour réaliser une communication interprocessus (IPC)When a “Service” isusing IPC, an AIDL description of itsfeaturesisalsoneeded. • Android Interface DefinitionLanguage (AIDL) isused to generate code to allow communication betweentwoprocessesthrough IPC • This mechanismis interface-based, similar to Corba (Unix) or COM (windows) but Iighterweight • Withthisspecific mode, the ‘Service” isstartedthrough the binder and not with“startService()” ? A refaire ?