Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
170
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
Transcript
38 slides
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
More Decks by Scott Alexander-Bown
See All by Scott Alexander-Bown
What's New In Android 15 Security
scottyab
0
330
Fundamentals of creating Android mobile apps
scottyab
0
120
What's 'Q' in Android Security
scottyab
0
430
Faster mobile debugging using a HTTP Proxy
scottyab
0
110
I <3 Charles Proxy
scottyab
0
130
What_s_new_from_Google_IO_2018.pdf
scottyab
0
200
Doppl, an intro!
scottyab
0
150
OMG What's new in Security
scottyab
0
110
What's New from Google I/O 2017
scottyab
0
170
Other Decks in Technology
See All in Technology
AWS Blocksで AIエージェント作れるの知ってます?
kmiya84377
1
140
Del vibe coding a un Desarrollo (agéntico) fiable
jcabot
0
200
現地速報! Microsoft Ignite アップデートレポート
kasada
1
390
AI-Ready なデータ基盤ってなに? & 新卒未経験が、いま考えていること
imuta
0
1.1k
Well, that’s weird…
csswizardry
1
160
ブース設計、 お前もプロダクトだったのか / So Booth Design Was a Product All Along
akihiro0038
0
120
クラウドでも使えるNetApp -現場目線での設計とクラウドバックアップの活用
ryutakondo
1
270
AWS Client VPNの設定でハマったポイントとその過程での気づき
amarelo_n24
1
420
OpenTelemetryで変わった 新時代のCloudWatchメトリクス監視
tsukuboshi
0
480
kubellの最新データ分析環境
kubell_hr
2
210
共通基盤の実装に Kotlin - Quarkus を選定した理由と採用したアーキテクチャ
nealle
1
150
HTTP QUERY時代の型安全な検索APIをKotlinで設計する
sansantech
PRO
1
120
Featured
See All Featured
Visualization
eitanlees
153
17k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
530
Balancing Empowerment & Direction
lara
6
1.4k
Producing Creativity
orderedlist
PRO
348
41k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
2
550
The Language of Interfaces
destraynor
162
27k
Building the Perfect Custom Keyboard
takai
2
960
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
600
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.5k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.7k