teaching machines

SENG 440: Lecture 14 – Alarms and Notifications

Dear students, Today we examine some helpful utilities: notifications and alarms. We’ll write an app that prompts the user to accumulate memories by taking a photo each day. Today we’ll focus on the prompting side of things, saving the camera for later. Before we forget, here’s your TODO for next time: Read the project 2 […]

SENG 440: Project 2

See the PDF.

SENG 440: Lecture 13 – Object-Relational Mapping via Room

Dear students, Today we examine persisting data with databases. We will add a song database to our Rattler application. Initially we’ll just maintain an in-memory database, but then we’ll switch to long-term storage using Room, an object-relational mapping framework. Since ORM tools let us maintain our schema and forge our queries in our host language, […]

SENG 440: Lecture 12 – Media Player and Ringtones

Dear students, Most of the big ideas of mobile computing are behind us. We’ve discussed the event-driven model of computing, offloading tasks from the main thread onto background threads, persisting data, connecting to web services, and the service-oriented architecture of mobile devices. For the rest of the semester, we just have fun. Today we have […]

SENG 440: Lecture 10 – Master + Detail via Fragments

Dear students, Today we extend our Lately app by applying a master+detail UI to it. It will show both a list of headlines and a selected article. One phones, these two views will appear as separate screens, but on a tablet, they will both appear on the same screen. We will use Android’s Fragment class […]

SENG 440: Lecture 11 – Resources

Dear students, Today we wrap up our Lately app by presenting its master+detail UI on tablets as a single screen, showing both the list of headlines and the selected article. We’ll also add some labels to the UI to explain the widgets. Both of these tasks will accomplished with the help of Android’s resource system. […]

SENG 440: Lecture 9 – RecyclerView

Dear students, On Friday afternoon, I left my office to go pick up my children from school. They went into lockdown right as I arrived. We weren’t sure what to do, so most of us milled about awkwardly for three hours. It didn’t seem like a good idea to congregrate outside the school gates, but […]

SENG 440: Lecture 8 – AsyncTask

Dear students, Today we explore how to fetch JSON data from a web service, which we will eventually show in a list. Our app, which we’ll call Lately, will grab headlines from News API. In this lecture, we’ll be grabbing headlines from the BBC. Helping us today is Android’s AsyncTask. We’ll continue this example in […]

SENG 440: Lecture 7 – Persisting with Files and JSON

Dear students, We’ve now written four little apps together. We’ve used buttons, text labels, text boxes, and lists to form their user interfaces. We’ve used ConstraintLayout to arrange the widgets. We’ve seen how to handle events with lambdas and schedule events with Handler. We’ve seen how to jump from screen to screen or from one […]

SENG 440: Lecture 6 – Explicit Intents

Dear students, Last time we got our apps to invoke other apps indirectly through an Intent. Our requests were implicit; we only described the service we needed performed. The OS then offered us a list of all the apps that could do the job. Today, we look at invoking specific Activitys through explicit Intents. We […]

1 2 3 200