Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Android Crash Course Lunch and Learn

Learn the basics of Android programming with this free Lunch and Learn session by feature[23].

  • Be the first to comment

Android Crash Course Lunch and Learn

  1. 1. Version(s) API Level(s) Year(s) SDK Notes / New Features 1.0-1.1 1-2 2008-2009 First releases, Android Market 1.5 “Cupcake” 3 2009 3rd party keyboards, Widgets 1.6 “Donut” 4 2009 Speech engine 2.0-2.1 “Éclair” 5-7 2009 HTML5, Bluetooth API, Multi-touch SDK 2.2 “Froyo” 8 2010 Performance, JIT,V8 engine, push notifications, Hi-DPI 2.3 “Gingerbread” 9-10 2010-2011 New UI,WXGA,VoIP, NFC, multiple cameras, concurrent GC, more sensors supported 3.0-3.2 “Honeycomb” 11-13 2011 Holo UI, tablets only, System bar, Action bar, two-pane UI, multi-core processors, external keyboards/mice
  2. 2. Version(s) API Level(s) Year(s) SDK Notes / New Features 4.0 “Ice Cream Sandwich” 14-15 2011 Brings 3.x features to phones, speech to text 4.1-4.3 “Jelly Bean” 16-18 2012-2013 “Project Butter”, expandable notifications, 7” tablet UI, geofencing, native emojis 4.4 “KitKat” 19 2013 Low RAM device support, cleaner Holo UI, immersive mode apps,WebView uses Chromium, Storage Access Framework, UI transition framework 4.4W “KitKat” 20 2013 Wearable extensions (smartwatches) 5.0-5.1 “Lollipop” 21-22 2014-2015 Android Runtime (ART), 64-bit support, vector drawables, Material Design,WebView updated through Play Store 6.0 “Marshmallow” 23 2015 Data backup/restore for apps, in-app permission checks
  3. 3. C# Keyword / Usage Java Keyword / Usage bool boolean string <none> (use String type) namespace (block scoped) package (file scoped) using (a namespace or “static”) import (a package, class, or wildcard) base super MyClass : MyBaseClass, IMyInterface MyClass extends MyBaseClass implements MyInterface const (field) static final readonly final sealed final <none> (variable used in lambda) final (variable used in anonymous inner class) is instanceof lock synchronized foreach (Type item in collection) for (Type item : collection) typeof(MyClass) MyClass.class
  4. 4. .NETType JavaType IEnumerable, IEnumerable<T> Iterable<T> IEnumerator, IEnumerator<T> Iterator<T> IList, IList<T> List<E> List<T> ArrayList<E> implements List<E> IDictionary<TKey,TValue> Map<K,V> Dictionary<TKey,TValue> HashMap<K,V> implements Map<K,V> KeyValuePair<TKey,TValue> Map.Entry<K,V> ICollection<T> Collection<E> ISet<T> Set<E> HashSet<T> HashSet<E> implements Set<E>
  5. 5. .NETType JavaType(s) System.Guid java.util.UUID System.DateTime java.util.Date System.IDisposable System.ISerializable System.IO.Stream, System.Type java.lang.Class<T> System.Uri,, System.Text.RegularExpressions.Regex java.util.regex.Matcher, java.util.regex.Pattern
  6. 6. Notice: final keyword, MainActivity.this, and thatView.OnClickListener is an interface
  7. 7. EmailActivity EmailListFragment EmailActivity EmailListFragment EmailMessageFragment Phone UI Tablet UI EmailMessageFragment
  8. 8.
  9. 9.
  10. 10. Lifetime First Call Final Call Entire Lifetime onCreate onDestroy Visible Lifetime onStart onStop Foreground Lifetime onResume onPause
  11. 11. Lifecycle Method Next Method Common Usage onCreate onStart Set up activity’s view, get view references (findViewById), restore instance state onStart onResume or onStop (rare) onRestart onStart (rare) onResume onPause Start any timers or CPU-consuming tasks, refresh UI elements, play audio/video onPause onResume or onStop Pause any timers or CPU-consuming tasks, pause audio/video onStop onRestart or onDestroy (rare) Clean up your activity onDestroy nothing (rare) Clean up your activity * onSaveInstanceState Save instance state (duh) * onRestoreInstanceState (rare) Restore instance state (duh) * Not part of previous diagram
  12. 12. Intent Action (public static final String) Example Usage Intent.ACTION_VIEW Open URL Intent.ACTION_ATTACH_DATA Attach photo to a contact Intent.ACTION_EDIT Edit a calendar entry Intent.ACTION_PICK Pick a file from a directory Intent.ACTION_DIAL Call a number Intent.ACTION_SEND Share something (system share chooser) Intent.ACTION_SEARCH Perform a system search Intent.ACTION_WEB_SEARCH Perform a web search MediaStore.ACTION_IMAGE_CAPTURE Take a photo with the camera (default app) MediaStore.ACTION_VIDEO_CAPTURE Record a video with the camera (default app)
  14. 14. Directive Example Description compileSdkVersion compileSdkVersion 23 Which API level this is compiled against buildToolsVersion buildToolsVersion “21.1.2” Android BuildTools installed version applicationId applicationId “com.feature23.hello” The unique app ID, used by the OS minSdkVersion minSdkVersion 19 App won’t run on devices below this targetSdkVersion targetSdkVersion 23 Which API level this app is tested against versionCode versionCode 2 Integer version code, must increment each release, no decimal places versionName versionName “1.01” User-friendly version number compile compile '' Add a Maven dependency compile files('libs/coollection- 0.2.0.jar') Add a jar dependency