WHO THE HECK IS THIS GUY? ➤ Senior Android Developer @ Help Scout ➤ Remote, in Bristol ➤ Google Developer Expert for Android ➤ Founder/Organiser SWMobile Meetup ➤ http://swmobile.org ➤ Co-Author Android Security Cookbook ➤ Follow on Twitter @scottyab @scottyab
AT A GLANCE ➤Intro ➤Fundamentals ➤Android, toolkit and ecosystem ➤Android App Components ➤Development Tips ➤Don’t reinvent the wheel (use open source code) ➤What next?
MOBILE APPS != WEB SITE ➤ Screen size ➤ User context - maps/GPS/bluetooth/camera/accelerometer ➤ Platform integration ➤ Interaction model - glanciblity not sit down focus ➤ Intuitive (focused actions) ➤ Work offline ➤ Permissions - well defined
EMULATOR ➤ Don’t need an actual device ➤ although testing on one is recommended ➤ GPS/Cellular/Battery/Virtual sensors ➤ Screen recording/Screen shot ➤ Snap shots
.APK AND DISTRIBUTION ➤ Android apps are packaged as .apk or .aab ➤ Signed with signing key ➤ Upload to the Play Store • $25 one off registration fee • Screen shots • Unique App Id developer.android.com/distribute/best-practices/launch/launch-checklist.html
GET OFF THE UI THREAD - ASYNCTASK ➤ Yes, there are better ways (Kotlin Coroutines, RX Java, Threadpool executor, …) ➤ But for getting started check out AsyncTask ➤ Set up ➤ onPreExecute() ➤ Do this work in the background ➤ doInBackground(arguments) ➤ Here’s the result on the main thread for you ➤ onPostExecute(result) @scottyab https://developer.android.com/reference/android/os/AsyncTask
SAVING DATA ➤ Files (internal and external storage) ➤ SQLite ➤ Use Room persistent library a wrapper on top of SQLite ➤ Shared preferences ➤ Simple to use ➤ Combine with JSON parsing to save @scottyab https://developer.android.com/guide/topics/data/data-storage.html#pref
MISC TIPS* ▸ Logic out of the View (i.e Activity or Fragments) ▸ Easier to test ▸ Simple architecture (MVP or MVVM) ▸ Constructor based dependancies ▸ Lock to portrait ▸ Test on real devices ▸ Min SDK 23 @scottyab * For your first app