Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android basics (for newcomers)

Android basics (for newcomers)

Adrien Couque

March 24, 2015
Tweet

More Decks by Adrien Couque

Other Decks in Technology

Transcript

  1. Here is the legend or source Outline • Make-up of

    an app • Android ecosystem • A bit of design Android Introduction 2015 •
  2. 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, …)
  3. 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);
  4. Android Introduction 2015 • Implicit intents • If several applications

    can answer the intent, a picker asks the one the user wants to use
  5. 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/
  6. 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
  7. 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
  8. Android Introduction 2015 • Content Providers • Abstraction for access

    to data (generally : database) • Can work across applications • Examples : • Contacts • Calendar
  9. Android Introduction 2015 • Manifest • Name, Icon, Package, Version

    • Permissions • Device Restrictions • Components • Activities • Services • Content Providers • Background Receivers
  10. 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
  11. 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
  12. Android Introduction 2015 • Manifest : Gmail <?xml version="1.0" encoding="utf-8"

    standalone="no"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.android.gm" platformBuildVersionCode="21"> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.GET_ACCOUNTS"/> <uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/> <uses-permission android:name=“android.permission.INTERNET"/> <application android:icon="@mipmap/ic_launcher_mail" android:theme="@style/UnifiedEmailTheme"> <activity android:name=".welcome.WelcomeTourActivity" android:theme="@style/GmailTheme.NoActionBar.WelcomeTour"/> <activity android:name=".welcome.SetupAddressesActivity" android:theme="@style/GmailTheme.NoActionBar.SetupAddresses"/> <activity android:name=".welcome.WelcomeVideoActivity" android:theme="@style/GmailTheme.NoActionBar.Fullscreen"/> <provider android:authorities="com.google.android.gmail.attachmentprovider;com.google.android.gm.email.attachmentprovider" android:name="com.android.email.provider.AttachmentProvider"/> <receiver android:exported="true" android:name="com.android.email.service.AttachmentService$AttachmentWatchdog"/> <service android:name="com.android.mail.compose.EmptyService"/> <service android:name="com.android.mail.MailLogService"/> <service android:name="com.android.mail.browse.EmlTempFileDeletionService"/> </application> </manifest>
  13. Here is the legend or source Outline • Make-up of

    an app • Android ecosystem • A bit of design Android Introduction 2015 •
  14. 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