Homework 0 – Updating SpecCheckers
Like you, your instructor is a human with finite supplies of time and energy. Errors inevitably creep into the SpecCheckers, whose JAR files are sitting in your cloned repository. Your instructor will fix the errors, but how do you get the fixes into your repository? A decade ago you would download the updated JAR files […]
Homework 0 – Goodbye, Pluto
Your task in this homework—which is worth no Blugolds—is to set up your repository and IntelliJ IDEA project and to acclimate yourself to the SpecChecker grading tools. GitLab You are probably used to two kinds of systems for editing and managing files. Some tools are installed on your local machine and edit files stored on […]
SENG 440: Lecture 24 – Finish
Dear students, Today we wrap up our course. Let’s recount what happened this semester. In week 1 we examined Kotlin, a language that many of us hadn’t used before—myself included. It seemed like the right thing to do, and that decision was recently validated by Android chief advocate Chet Haase at Google I/O: We’re announcing […]
SENG 440: Lecture 23 – CameraX
Dear students, Today we will create an app called Two-Face that allows the user to take a split image on the front-facing camera. The left half and right half are taken at separate times. We will use the new CameraX API that was just announced at Google I/O. Before I forget, here’s your final TODO: […]
University of Canterbury Seminar
Hi, I’m Chris and I teach people to teach machines. But I am a reluctant computer scientist. Sometimes I get concerned that the thing I know the most about is not directly linked to my survival. My father knew how to keep machines running. My wife grows vegetables. In a post-apocalyptic world, they would be […]
SENG 440: Lecture 22 – Speech Recognition
Dear students, Today we will create an app called Recog that presents anagrams for the user to unscramble. But instead of typing, the user will speak the answer. We’ll use Android’s speech recognition facilities to make this happen. Next lecture we will explore the new CameraX API that was just announced at Google I/O 2019. […]
SENG 440: Lecture 21 – Panning and Zooming
Dear students, Today we will examine two common gestures that occur on mobile platforms: pinch-and-zoom and panning. We won’t create a full app, just a custom view that displays an image and supports these two gestures. First we’ll implement it by just adjusting the bounding rectangle containing the image. Once that works, we’ll switch transform […]
SENG 440: Lecture 20 – Multitouch
Dear students, Today we write an app that solves the problem of choosing of which player goes first in a game. All players place a finger on the phone, and the app chooses one of them randomly. The game is inspired by the commercial app Chwazi. Next lecture we will discuss writing an app that […]
SENG 440: Lecture 19 – Nearby
Dear students, Today we write an app that allows multiple devices to play a single piano using Google’s Nearby API. One device serves as the host, running a third-party MIDI interpreter. (I use FluidSynth.) A client joins the host. The host device plays octave 4, and the client device plays octave 5. Next lecture we […]
Fittin’ Image
How do you fit an image inside a frame such that every pixel is visible and the image isn’t distorted? In CSS, we write object-fit: contain. In an Android ImageView, we use centerInside. But what if you are alone in the wild lands of custom drawing? We must determine the scale factors ourselves. I’ve solved […]