android development - part 1
TRANSCRIPT
-
8/10/2019 Android Development - Part 1
1/38
Introduction to
Android Developmen
Part 1
So, you wanna build an app?
Online Seminar
Konrad Grski
JLC Gdask
-
8/10/2019 Android Development - Part 1
2/38
Konrad Grski
JLC Gdask
Co-creator of Split It!
Whos this guy?
fb.com/konradg
twitter.com/kon
C
-
8/10/2019 Android Development - Part 1
3/38
Whats the plan?
Introduction
The System
The Tools
The A
2x 4
-
8/10/2019 Android Development - Part 1
4/38
-
8/10/2019 Android Development - Part 1
5/38
Why Android?
Popularity
Availability
Community support
-
8/10/2019 Android Development - Part 1
6/38
Introduction
The Tools
The A
The System
-
8/10/2019 Android Development - Part 1
7/38
What is Android?
Linux kernel
Runtime(Dalvik VM + libraries:
WebKit, Media, SQLite etc.)
End-user apps
An OS A framew
API for dev
Android ecoGoogle Ser
-
8/10/2019 Android Development - Part 1
8/38
What is Android?
-
8/10/2019 Android Development - Part 1
9/38
Androids not one device
Platform versions
Screen sizes
Vendor add-ons
CPU architectures
ITSA
-
8/10/2019 Android Development - Part 1
10/38
Fragmentation
http://developer.android.com/about/dashboards/index.html
API 9-10API 14-15
API 16-18
API 19
http://developer.android.com/about/dashboards/index.html -
8/10/2019 Android Development - Part 1
11/38
The A
Introduction
The System
The Tools
-
8/10/2019 Android Development - Part 1
12/38
Getting started
Google android sdk developer.android.com/sdk/
Download & unpack theADT Bundle
Run eclipse
http://developer.android.com/sdk/http://developer.android.com/sdk/http://developer.android.com/sdk/ -
8/10/2019 Android Development - Part 1
13/38
Whats inside?
Eclipse - the IDE
Android SDK
System image (for emulator)
Emulator instance
-
8/10/2019 Android Development - Part 1
14/38
Physical device Fast, compatible
Hardware features
Emulator
Different screen sizes
Host GPU / HAXM / GenyMotion if too slugg
Running my app
-
8/10/2019 Android Development - Part 1
15/38
Logcat
Useful debugging tool:Log.d(MyActivity, App launched
-
8/10/2019 Android Development - Part 1
16/38
Quick question #1
You used an API method from API14. Yothe app on an API10-device. What happ
A. nothing
B. app crashes
C. it wouldnt even compile
-
8/10/2019 Android Development - Part 1
17/38
Quick question #1
You used an API method from API14. Yothe app on an API10-device. What happ
A. nothing
B. app crashes
C. it wouldnt even compileLINT
-
8/10/2019 Android Development - Part 1
18/38
Introduction
The System
The Tools
The A
-
8/10/2019 Android Development - Part 1
19/38
General considerations
Mobileapp?
Always ready to wrap up
Part of the environment
Highly context-dependent
-
8/10/2019 Android Development - Part 1
20/38
General considerations
Mobileapp?
Always ready to wrap up
Part of the environment
Highly context-dependent
-
8/10/2019 Android Development - Part 1
21/38
General considerations
Mobileapp?
Always ready to wrap up
Part of the environment
Highly context-dependent
-
8/10/2019 Android Development - Part 1
22/38
First project
Oh, theres a wizar
-
8/10/2019 Android Development - Part 1
23/38
First project
Warning: Scumbag Wizard
image: quickmeme.com
http://quickmeme.com/ -
8/10/2019 Android Development - Part 1
24/38
Whats inside?
src source (.java) res resources (.xml, .png)
libs libraries (.jar, .so)
assets misc files (.ttf, .html...)
-
8/10/2019 Android Development - Part 1
25/38
Layouts layout/my_super_layout.xml layout-land/my_super_layout.xml Translations values/strings.xml
values-es/strings.xml
Drawables
Dimensions
Animations
XML resources
-
8/10/2019 Android Development - Part 1
26/38
Parts of an appActivity Activity
Service BroadcastReceiver
Intent
BroadcastFragment
ViewView
View
Intent
Non-UI
UI
-
8/10/2019 Android Development - Part 1
27/38
-
8/10/2019 Android Development - Part 1
28/38
Ordnung muss sein
AndroidManifest.xml Activities, Services, global BroadcastRec
IntentFilters
Permissions
...
-
8/10/2019 Android Development - Part 1
29/38
Activity
Whole-screen UI
controller
Views organized in
layouts
Manages Fragments
Peculiar lifecycle
Activity
The lifecycle
onCreate
onStart
onResume
onPause
onStop
onDestroy
Lets c
The Hollyw
Dont call u
-
8/10/2019 Android Development - Part 1
30/38
View
UI control
Inflated from XML or created in Java
Can be nested (tree)
-
8/10/2019 Android Development - Part 1
31/38
Sample View types
ListView
Tex
Butto
-
8/10/2019 Android Development - Part 1
32/38
Layouts are Views, too
LinearLayout RelativeLayout Frame
img: developer.android.
http://developer.android.com/http://developer.android.com/ -
8/10/2019 Android Development - Part 1
33/38
Quick question #2
Q: Can an app have no UI at all?
-
8/10/2019 Android Development - Part 1
34/38
Q: Can an app have no UI at all?A: Yes!
Quick question #2
Our app
Network statuschange
Systembroadcast
BroadcastReceiver Se
-
8/10/2019 Android Development - Part 1
35/38
Navigating through the app
Moving from one Activity to another: using Intent class
Intents:
Explicit: Intent(this, MyNextActivity.class); Implicit: Intent(Intent.ACTION_VIEW);
Extras
-
8/10/2019 Android Development - Part 1
36/38
Summary
Android development - more than cod Activities and fragments host UI beha
Think of layouts in functional terms
Intents express where you want to go
-
8/10/2019 Android Development - Part 1
37/38
Question time!
-
8/10/2019 Android Development - Part 1
38/38
Thats all, folks!
See you in January :)