Slide 1

Slide 1 text

Paris, March 24th 2015 Android Introduction Basic concepts to understand Android applications

Slide 2

Slide 2 text

Here is the legend or source Outline • Make-up of an app • Android ecosystem • A bit of design Android Introduction 2015 •

Slide 3

Slide 3 text

Android Introduction 2015 • Activities • Necessary to display content on screen • Takes the full screen (except status bar and virtual buttons) • Should be : one activity = one user action (read, write, search, …)

Slide 4

Slide 4 text

Android Introduction 2015 • Activities : Lifecycle Resumed Paused Stopped

Slide 5

Slide 5 text

Android Introduction 2015 • Activities : Lifecycle

Slide 6

Slide 6 text

Android Introduction 2015 • Activities : Fragments

Slide 7

Slide 7 text

Android Introduction 2015 • Intents • Used to call new components (like Activities) • Two types of intent : • Explicit • Implicit new Intent(context, DiveCreateVisibilityActivity.class); new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

Slide 8

Slide 8 text

Android Introduction 2015 • Implicit intents • If several applications can answer the intent, a picker asks the one the user wants to use

Slide 9

Slide 9 text

Android Introduction 2015 • Implicit intents : examples • ACTION_VIEW content://contacts/people/1 • ACTION_DIAL content://contacts/people/1 • ACTION_VIEW tel:123 • ACTION_DIAL tel:123 • ACTION_EDIT content://contacts/people/1 • ACTION_VIEW content://contacts/people/

Slide 10

Slide 10 text

Android Introduction 2015 • Services • Background component • Not linked to an activity : can survive after the leaves the app, across activities, … • Communication with Activities through Intents • Uses : • Background sync • Music • Heavy calculations

Slide 11

Slide 11 text

Android Introduction 2015 • Broadcasts • Intents sent at the system level for all apps to listen • Multiple applications can be triggered by the same broadcast (vs implicit Intent) • Examples : • ACTION_BOOT_COMPLETED • ACTION_SHUTDOWN • ACTION_POWER_CONNECTED • Push

Slide 12

Slide 12 text

Android Introduction 2015 • Content Providers • Abstraction for access to data (generally : database) • Can work across applications • Examples : • Contacts • Calendar

Slide 13

Slide 13 text

Android Introduction 2015 • Manifest • Name, Icon, Package, Version • Permissions • Device Restrictions • Components • Activities • Services • Content Providers • Background Receivers

Slide 14

Slide 14 text

Android Introduction 2015 • Permissions • Required (and shown) before installation (vs iOS) • Required for anything (> 150) : • Internet • Location • Storage • Battery stats • Bluetooth, NFC, Sensors • Acces and modify user data • Possible to create new permissions

Slide 15

Slide 15 text

Android Introduction 2015 • Gmail permissions : 33 android.permission.AUTHENTICATE_ACCOUNTS android.permission.ACCESS_NETWORK_STATE android.permission.GET_ACCOUNTS android.permission.MANAGE_ACCOUNTS android.permission.INTERNET android.permission.READ_CONTACTS android.permission.WRITE_CONTACTS android.permission.READ_CALENDAR android.permission.WRITE_CALENDAR android.permission.READ_SYNC_SETTINGS android.permission.READ_SYNC_STATS android.permission.RECEIVE_BOOT_COMPLETED android.permission.SUBSCRIBED_FEEDS_READ android.permission.SUBSCRIBED_FEEDS_WRITE android.permission.USE_CREDENTIALS android.permission.VIBRATE android.permission.WAKE_LOCK android.permission.WRITE_SYNC_SETTINGS android.permission.WRITE_EXTERNAL_STORAGE com.google.android.gm.permission.READ_GMAIL com.google.android.gm.permission.WRITE_GMAIL com.google.android.googleapps.permission.GOOGLE_AUTH com.google.android.googleapps.permission.GOOGLE_AUTH.mail com.google.android.providers.gsf.permission.READ_GSERVICES com.google.android.gm.permission.AUTO_SEND com.google.android.voicesearch.AUDIO_FILE_ACCESS android.permission.DOWNLOAD_WITHOUT_NOTIFICATION android.permission.NFC com.google.android.gm.email.permission.READ_ATTACHMENT com.google.android.email.permission.READ_ATTACHMENT com.google.android.gm.email.permission.ACCESS_PROVIDER com.google.android.email.permission.ACCESS_PROVIDER android.permission.READ_PROFILE

Slide 16

Slide 16 text

Android Introduction 2015 • Apk Manifest lib res assets classes.dex resources.arsc META-INF

Slide 17

Slide 17 text

Android Introduction 2015 • Manifest : Gmail

Slide 18

Slide 18 text

Here is the legend or source Outline • Make-up of an app • Android ecosystem • A bit of design Android Introduction 2015 •

Slide 19

Slide 19 text

Android Introduction 2015 • Fragmentation : devices

Slide 20

Slide 20 text

Android Introduction 2015 • Fragmentation : OS

Slide 21

Slide 21 text

Android Introduction 2015 • Fragmentation : OS

Slide 22

Slide 22 text

Fragmentation : screens

Slide 23

Slide 23 text

Android Introduction 2015 • Fragmentation AOSP Support Library Play Services

Slide 24

Slide 24 text

Android Introduction 2015 • Fragmentation

Slide 25

Slide 25 text

Android Introduction 2015 • Design

Slide 26

Slide 26 text

2015 • Keylines Material Design (dev)

Slide 27

Slide 27 text

2015 • Text Material Design (dev) @style/TextAppearance.AppCompat.Title @style/TextAppearance.AppCompat.Body1

Slide 28

Slide 28 text

2015 • Icons Material Design (dev) https://github.com/google/material-design-icons

Slide 29

Slide 29 text

2015 • Elevation Material Design (dev) ViewCompat.setElevation(view, 8dp) CardView + card_view:cardElevation PNG

Slide 30

Slide 30 text

Android Introduction 2015 • Action Bar

Slide 31

Slide 31 text

ToolBar : default metrics Material Design (dev)

Slide 32

Slide 32 text

Android Introduction 2015 • Floating Action Button

Slide 33

Slide 33 text

Android Introduction 2015 • Navigation Drawer

Slide 34

Slide 34 text

Android Introduction 2015 • Navigation Drawer

Slide 35

Slide 35 text

2015 • Navigation Drawer Material Design (dev) https://github.com/ mikepenz/MaterialDrawer

Slide 36

Slide 36 text

2015 • Dialogs : AppCompatDialog Material Design (dev)

Slide 37

Slide 37 text

2015 • Bottom sheets Material Design (dev) https://github.com/ soarcn/BottomSheet

Slide 38

Slide 38 text

Android Introduction 2015 • Up vs Back Navigation

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

Android Introduction 2015 • Up vs Back Navigation

Slide 41

Slide 41 text

Android Introduction 2015 • Up vs Back Navigation

Slide 42

Slide 42 text

Android Introduction 2015 • Up vs Back Navigation

Slide 43

Slide 43 text

Android Introduction 2015 • Notifications

Slide 44

Slide 44 text

Android Introduction 2015 • Notifications

Slide 45

Slide 45 text

Android Introduction 2015 • Notifications

Slide 46

Slide 46 text

Android Introduction 2015 • Notifications

Slide 47

Slide 47 text

Android Introduction 2015 • Notifications

Slide 48

Slide 48 text

I/O Recap 2014 • Material design

Slide 49

Slide 49 text

Nom de la présentation 2012 • Material design Cross platform design: phones, tablets, laptops, web Metaphor: paper and ink Animations and transitions Shadows Vivid colors Ripples

Slide 50

Slide 50 text

I/O Recap 2014 • Topics Android Wear Android Auto Android TV

Slide 51

Slide 51 text

Any questions ? Thanks