Android 101: Intro to Android
Directed by Travis Smith
@iamtravisjsmith
Who is Travis?
What is Android?
Getting Started
Activities
Activity Lifecycle
onResume()
onCreate()
onStart()
onPause()
onStop()
onDestroy()
Activity Shut Down
Activity Running
Activity Launched
App Process Killed
onRestart()
App with higher priority needs memory
Another activity comes into the foreground
User returns to the activity
The activity is no longer visible
The activity is finished or being destroyed by the system
User navigates to the activity
Layouts
AndroidManifest.xml
Let’s make an app.
Creating a New Project
Why minSdkVersion 19?
Create our First Activity
That was easy. Let’s step it up.
Sample App - What to make?
SampleWeatherApp
What does the API give us?
{
"coord": {"lon":-86.78,"lat":36.17},
"weather":[
{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}
],
"base":"stations",
"main":{"temp":290.65,"pressure":1007,"humidity":68,"temp_min":290.15,"temp_max":291.15},
"visibility":16093,
"wind":{"speed":2.1,"deg":130},
"clouds":{"all":1},
"dt":1487903700,
"sys":{"type":1,"id":2533,"message":0.0061,"country":"US","sunrise":1487938999,"sunset":1487979458},
"id":4644585,
"name":"Nashville",
"cod":200
}
Let’s see some code.
Thanks!
QA Time!
Sample Code