Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Getting Started in Android Dev 2016
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Scott Alexander-Bown
November 07, 2016
Technology
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Getting Started in Android Dev 2016
Guest lecture/talk for Comp Sci Bristol University - Nov 2016.
Scott Alexander-Bown
November 07, 2016
More Decks by Scott Alexander-Bown
See All by Scott Alexander-Bown
What's New In Android 15 Security
scottyab
0
250
Fundamentals of creating Android mobile apps
scottyab
0
99
What's 'Q' in Android Security
scottyab
0
360
Faster mobile debugging using a HTTP Proxy
scottyab
0
82
I <3 Charles Proxy
scottyab
0
120
What_s_new_from_Google_IO_2018.pdf
scottyab
0
170
Doppl, an intro!
scottyab
0
130
OMG What's new in Security
scottyab
0
86
What's New from Google I/O 2017
scottyab
0
150
Other Decks in Technology
See All in Technology
Android の公式 Skill / Android skills
yanzm
0
160
アジャイルな経理と Claude Code と経営の未来
kawaguti
PRO
3
170
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
2k
PostgreSQL 19 新機能概要 OSC Hokkaido 2026
nori_shinoda
0
180
GitHub Copilot 最新アップデート – 「一歩先」の実践活用術
moulongzhang
5
1.5k
IaC コードを資産へ:AWS CDK 社内ライブラリと横断展開 / aws-summit-japan-2026
gotok365
9
1.3k
ロボティクスの技術 / Robotics Technology
ks91
PRO
0
110
【2026年版】 ベクトル検索とEmbedding最前線
mocobeta
21
5.7k
現場のトークンマネジメント
dak2
0
140
自宅LLMの話
jacopen
1
670
Agile and AI Redmine Japan 2026
hiranabe
3
340
10年間のブログ発信を振り返って見えたWebアプリケーションエンジニアとしての軌跡
stefafafan
0
170
Featured
See All Featured
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
330
Are puppies a ranking factor?
jonoalderson
1
3.6k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Designing Powerful Visuals for Engaging Learning
tmiket
1
420
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
410
Chasing Engaging Ingredients in Design
codingconduct
0
220
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Faster Mobile Websites
deanohume
310
31k
Transcript
GETTING STARTED WITH ANDROID DEV 2016 Scott Alexander-Bown @scottyab
WHO THE HECK IS THIS GUY? ➤ Freelance (remote) Android
Developer ➤ https://scottyab.com ➤ Google Developer Expert for Android ➤ Founder/Organiser SWMobile Meetup ➤ http://swmobile.org ➤ Co-Author Android Security Cookbook ➤ Follow on Twitter @scottyab @scottyab
@scottyab
AT A GLANCE ➤Tools / IDE ➤Components ➤Dependancies / 3rd
Party Libs ➤Tips *Reminder LAB - 11am to Midday, Wednesday 9th November 2016 Merchant Venturer's Building 2.11 Linux Computer Lab
What is Android?
https://developer.android.com @scottyab
@scottyab
Android Components @scottyab
ACTIVITY ➤ AKA a Screen ➤ has distinct lifecycle ➤
onCreate() ➤ onStart() ➤ onResume() ➤ onPause() ➤ onStop() ➤ onDestory() https://play.google.com/store/apps/details?id=name.peterscully.learning.activitylifecycle @scottyab
RESOURCES AND LAYOUTS ➤ Layouts • Xml ➤ Values •
Strings • Styles ➤ Drawables
DESIGN XML
INTENTS ➤ Action ➤ Extra ➤ Primitives ➤ Parcelables public
void sendMessage(String message) { Intent intent = new Intent(this, DisplayMessageActivity.class); intent.putExtra(EXTRA_MESSAGE, message); startActivity(intent); } @scottyab
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_display_message); Intent
intent = getIntent(); String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE); TextView messageText = (TextView)findViewById(R.id.messageText); messageText.setText(message); }
SERVICES ➤ Background operations ➤ Lifecycle ➤ Service ➤ Bind
➤ IntentService ➤ Work thread ➤ Start with Intent @scottyab
ANDROID MANIFEST.XML @scottyab
LISTS / RECYCLERVIEW ➤ Xml Layout for list <RecyclerView> ➤
Layout for the row ➤ Adapter ➤ Binding ➤ ViewHolder ➤ RecyclerView.setAdapter(…) @scottyab
FRAGMENTS ➤ Reusable UI/Logic component ➤ Own Lifecycle @scottyab
.APK AND DISTRIBUTION ➤ Android apps are packaged as .apk
files ➤ Signed with developer signing key ➤ Upload to the Play Store • $25 one off registration fee • Screen shots • Unique App Id @scottyab
Dependancies and 3rd party libraries
GRADLE ➤ Run from CI and IDE ➤ Easy dependancy
management ➤ Build variants • types • flavours
INCLUDING DEPENDANCIES ➤ build.gradle dependencies { /* * Google Play
services */ compile 'com.google.maps.android:android-maps-utils:0.4.4' compile 'com.google.android.gms:play-services-maps:9.6.1' compile 'com.google.android.gms:play-services-location:9.6.1' @scottyab
INCLUDING DEPENDANCIES (JITPACK) compile 'com.github.scottyab:Calligraphy:v2.1.1_LABEL_FOR' @scottyab
SUPPORT LIBRARY ➤ Backward-compatible versions of framework components. ➤ UI
elements to implement the recommended Android layout patterns. ➤ Support for different form factors. ➤ Miscellaneous utility functions. @scottyab
https://github.com/JakeWharton/butterknife UI: BUTTER KNIFE @scottyab
CONVERT JAVA OBJECTS INTO JSON AND BACK https://github.com/google/gson API: GSON
@scottyab
TYPE-SAFE HTTP CLIENT MAKES APIS EASY SIMPLE ASYNC https://github.com/square/retrofit API:
RETROFIT @scottyab
@scottyab
T ANDROID-ARSENAL.COM
@scottyab
None
USE GIT ➤ GitHub ➤ GitLab.com ➤ BitBucket @scottyab
TIPS ▸ Lock to portrait ▸ Focus on limited devices
▸ Test on demo devices ▸ Target SDK 15+ (or even 21+) @scottyab
AVOID ▸ Child Fragments ▸ Constraint layout ▸ Bleeding edge!
@scottyab
FABRIC / CRASHLYTICS ➤ By Twitter ➤ Crash Reporting ➤
Beta distribution ➤ Analytics ➤ https://get.fabric.io @scottyab
SAMPLE APPS ▸ github.com/google/iosched ▸ github.com/googlesamples/android-topeka ▸ github.com/nickbutcher/plaid ▸ github.com/chrisbanes/philm
▸ github.com/JakeWharton/u2020 ▸ github.com/googlesamples @scottyab
@scottyab
THANKS swmobile.org github/scottyab @scottyab
[email protected]
QUESTIONS? LAB - 11am to
Midday, Wednesday 9th November 2016 Merchant Venturer's Building 2.11 Linux Computer Lab
QUESTIONS? @scottyab