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
0
140
Getting Started in Android Dev 2016
Guest lecture/talk for Comp Sci Bristol University - Nov 2016.
Scott Alexander-Bown
November 07, 2016
Tweet
Share
More Decks by Scott Alexander-Bown
See All by Scott Alexander-Bown
What's New In Android 15 Security
scottyab
0
190
Fundamentals of creating Android mobile apps
scottyab
0
81
What's 'Q' in Android Security
scottyab
0
320
Faster mobile debugging using a HTTP Proxy
scottyab
0
66
I <3 Charles Proxy
scottyab
0
98
What_s_new_from_Google_IO_2018.pdf
scottyab
0
140
Doppl, an intro!
scottyab
0
110
OMG What's new in Security
scottyab
0
70
What's New from Google I/O 2017
scottyab
0
120
Other Decks in Technology
See All in Technology
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
150
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
180
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
560
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
130
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
Context Engineeringの取り組み
nutslove
0
270
Amazon Bedrock AgentCore 認証・認可入門
hironobuiga
2
500
顧客の言葉を、そのまま信じない勇気
yamatai1212
1
320
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
190
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
2
830
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.3k
IaaS/SaaS管理における SREの実践 - SRE Kaigi 2026
bbqallstars
4
1.6k
Featured
See All Featured
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
320
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
WCS-LA-2024
lcolladotor
0
440
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
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