Skip to content

Latest commit

 

History

History
58 lines (35 loc) · 1.46 KB

File metadata and controls

58 lines (35 loc) · 1.46 KB

Multithreading in Android

Objective

Students will become comfortable with:

  • what processes and threads are in general
  • how processes and threads work on Android
  • the role of the main (aka UI) thread and what to do and NOT do
  • the different ways to work with threading on Android

Do Now (Morning)

Create a number-guessing Android app. The app should prompt a user to guess a number between 1 and 10, and when the user hits the "submit" button, it tells the user if it guessed correctly.

Add a feature so that it gives the user 5 seconds to guess a number. User the sleep method in order to pause execution for 5 seconds.

Lesson (Morning)

Slides here

Processes

Threads

The UI Thread

Background Threads

Pod Meetings

Do Now (Afternoon)

Lesson (Afternoon)

Concurrency Models

Runnables
AsyncTask
IntentService
Handlers

Assessment

Exit Ticket

Resources

Video Tutorials: