Android for a Developer
Total Page:16
File Type:pdf, Size:1020Kb
A guided tour in Android World Fundamental Session 1 6-1-2016 © For internal use Who are we ? Practical Work - Session 1 ▶ Maxime PERON ▶ François FACON ▶ Ibrahim GHARBI ▶ François Julien Ritaine SDCO Engineer Mobile software R&D Engineer Mobile Web & Mobile architect expert [email protected] [email protected] [email protected] L’Appli Mon Coffre Mes Transferts Our job explained in 7 minutes (koreus.com) 2 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline Quizz time About you… ▶ Go to http://www.socrative.com – Then click on « STUDENT LOGIN » From A to H From I to Z T6SXFNK4 CWVS25TY ▶ Wait until I start the Quizz, then enter your « first name » & « last name » like this: FirstName LastName ▶ Complete the Quizz… 3 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline About Worldline by Atos 4 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline About Worldline by Atos 5 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline About Worldline by Atos R&D Strategy, Marketing & Communication Software Development Comunity Office Technical Operations Merchant Services Mobility & Financial Processing & e-Transactional & Terminals Services Software Licensing Retail, industry, Telco, medias, Bank, finance, hardware governement, sport assurance 6 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline Internships Objectives …What we will do together 1. Dive into 3. Work in a team The Android World and make great apps ! 2. Take a look at 4. Share our an application experiences, (main structure, tools, to be more components, efficient GUI, tools…) 7 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline Planning P2 Practical Work Project teams Project presentation D1 D2 D3 D4 D5 D6 P1 P2 26/11 03/12 10/12 17/12 07/01 14/01 21/01 28/01 QUIZZ D1 QUIZZ D2 QUIZZ D3 QUIZZ D4 QUIZZ D5 QUIZZ D6 - A bit of History… - Layout - ListView - SQLite - CursorAdapter - Thread - Deep in - Activity - Custom Cell - SQLiteDatabase - ContentObserver android - Intent - AsyncTask - Custom - ContentValues - Service - Buttons - Fragment - Adapter - Cursor - Inside an - PendingIntent - Listeners - ViewHolder - ContentProvider Android - ListView - Toast application - ImageView - ContentResolver - AlarmManager - Adapter - Preferences - Bitmap - URI - BroadcastReceiver - Menu - LayoutInflater - Authority - Notification Twitter Twitter Twitter Twitter Twitter Project Project App App App Hello World App App part 1 part 2 Step1 Step2 Step3 Step4 Step5 I.Gharbi I.Gharbi I.Gharbi I.Gharbi I.Gharbi I.Gharbi I.Gharbi I.Gharbi F.Facon F.Facon F.Facon F.Facon F.Facon F.Facon F.Facon F.Facon M.Peron FJ.Ritaine FJ.Ritaine 8 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline Agenda ▶ A little bit of history … – The mobile world – Android ecosystem ▶ Deep in android – How my apps are running inside android ? – Android for a developer ▶ Inside an android application – Prepare your environment and create your first app ! – Structure of an application 9 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline A little bit of history…. The mobile world 10 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline The mobile world From a simple phone to a « smart » one 2G : First Iphone 2G : Colors on Emergence of Android 1.0 First Phones Phone growth Web app & web phones Smartphones released (80s) (end of 90s) Experience experience (2004) (1997) (2001) (2007) (2008) Nokia Apple Nokia Sony Ericsson N95 Iphone HTC 3210 G1 Motorola T68i DynaTAC 8000X L'HISTOIRE DU SMARTPHONE EN 25 TÉLÉPHONES EMBLÉMATIQUES (CLUBIC.COM) 11 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline The mobile world A new device with new usages (1/2) ▶ 2010 : more Smartphones sales than PC ▶ 2013 : more tablets sales than PC in France IL S’EST-VENDU PLUS DE TABLETTES QUE DE PC EN FRANCE EN 2013 (LE FIGARO) 12 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline The mobile world A new device with new usages (2/2) ▶ Smartphone = consuming the Web ▶ Still less productivity than a standard PC DIGITAL SOCIAL MOBILE, LES CHIFFRES (WEARESOCIAL.FR) 13 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline The mobile world Mobile constraints User Interface (UI) User Experience (UX) != Bandwid Performa Ubiquity Battery Security Sensors th nce ▶ Operating System for mobile need to be specific. ▶ it’s a compromise of all those constraints 14 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline The mobile world Mobile operating system “An operating system (OS) is system software that manages computer hardware and software resources and provides common services for computer programs.” (Wikipedia) OS mobile Timeline : 90s 2010 2017 2000 2015 15 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline The mobile world Market share 16 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline SMARTPHONE OS MARKET SHARE (KANTARWORLDPANEL.COM) The mobile world Manufacturer share http://dazeinfo.com/2015/04/30/worl dwide-smartphone-shipments-q1- 2015-samsung-is-back-to-business/ SAMSUNG IS BACK TO BUSINESS 17 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline (DAZEINFO.COM) A little bit of history…. Android ecosystem 18 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline Android ecosystem What is android ? ▶ Mobile OS based on Linux ▶ Open Handset Alliance created in 2007 ▶ Designed to work on a large set – Develop open standards for mobile of devices devices ▶ Initially developed by a startup, ▶ AOSP ; open source version of bought by Google in 2005 android 19 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline A brief Android History A BRIEF HISTORY OF ANDROID 20 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline (THE VERGE) Android ecosystem To summarize M 2007 2015 ▶ The platform evolved with lots of changes between each versions providing to developers new possibilities ANDROID DE 2003 21 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline À AUJOURD’HUI (PRESSE-CITRON.NET) Android ecosystem Fragmentation (1/5) : Versions 22 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline ANDROID VERSION FRAGMENTATION IN REAL TIME ! Android ecosystem Fragmentation (2/5) : Hardware fragmentation ▶ Differences : – CPU/GPU – Memory – Storage – Screen size – Density – Battery – Sensors 23 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline ANDROID DEVICE FRAGMENTATION (OPEN SIGNAL) Android ecosystem Fragmentation (3/5) : Manufacturer / M(V)NO fragmentation ▶ Apps (browser , sms , photo manager …) ▶ GUI (Graphical User Interface) – Samsung Touchwizz – HTC Sense – LG UX – Sony Timescape – … ▶ Android customization (custom room) – CyanogenMod – Remix OS ….. 24 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline Android ecosystem Fragmentation (4/5) : Devices fragmentation ▶ Designed to run on a large set of devices : – Smartphone, Tablet – TV – Watch – Car player – Washing machine… ▶ … on specific operating system version : Android M 25 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline Android ecosystem Fragmentation (5/5) : solutions ? ▶ For new theme, components, design pattern , backport exist : Use support library ▶ Android design ▶ Google play support library services ▶ Google Cloud Testing ▶ Android system webview 26 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline ANDROID SUPPORT LIBRARY Android ecosystem design history Android iOS → (2012) Holo (2014) Material design (2013) Flat design 27 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline ANDROID MATERIAL DESIGN Agenda ▶ A little bit of history … – The mobile world – Android ecosystem ▶ Deep in android – How my apps are running inside android ? – Android for a developer ▶ Inside an android application – Prepare your environment and create your first app ! – Structure of an application 28 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline Deep in android… How my apps are running inside android ? 29 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline How my apps are running inside android ? 4 Fundamentals ▶ Language for your applications : – Java 6… not 7 ! ▶ A Virtual Machine like JVM: Dalvik – JIT – Compiled in DEX files ▶ Dalvik is now replaced by ART – experimental on 4.4 – fully integrated on android 5.x ▶ Application packaged in Android PacKage (APK) that contains : – .dex with Java classes – Manifest in binary – Resources (images, labels, themes, …) 30 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline How my apps are running inside android ? Simple architecture ▶ Both on KitKat ( Dalvik by default) ▶ ART only on Lollipop 31 | 1/6/2016 | Maxime Peron, Bruno Verachten, Ibrahim Gharbi, François Facon © Worldline An Android app from the inside Architecture : the 5 rules 1. You developed