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
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
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
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
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"/>
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
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
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 ?