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 […]

SENG 440: Lecture 18 – Location

Dear students, Today we write an app for hiding and finding messages in geographic locations. Our primary goal is to explore how to acquire and use a device’s location, and this app is just one playful example of the many possible applications that are aware of the user’s place. Next lecture we will discuss communicating […]

SENG 440: Lecture 17 – Gravity Sensor

Dear students, Today we write Lonely Phone, an app that senses when the phone is laid flat and starts ringing to grab the user’s attention. This will be the first time we use the code you wrote outside of class and submitted through the Crowdsource tool. This makes me slightly nervous. When I control the […]