Android Lectures 2023

General

This year the android lectures will be slightly different than the past years. Instead of a series of longer (90min) lectures, this year there is a youtube playlist with multiple short (<20min) videos, introducing you to the basics of android application development.

There are also example apps available on the GitHub attached to the youtube channel, as well as the GitHub from the past years. Both are linked in the module. You may use parts of these in your solutions, provided you add a reference in your source code. (NB: it might not always be possible to (easily) run a cloned project from the repo, often because of different SDK versions). If you run into problems when running the projects, you could try to let gradle rebuild the project on your machine, or (a bit more tedious) create an empty project and add the source files to your project (don't forget to add the dependencies as well).

To start developing you will need Android Studio, you can download the program from https://developer.android.com/studio Links to an external site..

We use the following course from android as extra material to go through to gain a deep understanding of android:

https://developer.android.com/courses/android-basics-compose/course Links to an external site.

Overview of subjects

Videos Readings and Exercises (pathways of the android course)
Lab 1:1 - Graphics, Touch events, Animations

No video yet, but follow the link for more information until video gets uploaded

Unit 1: Pathway 2 and 3

Unit 2: Pathway 2 and 3

Unit 4: Pathway 1 and 2

(for higher grade you also need to program data persistance, for which you can use Unit 6)

Lab 1:2 - Network Communication

Unit 3: Pathway 2

Unit 5: Pathway 1

Unit 6

Android code with small examples for multi threading, collect data from network, parsing JSON, test network connection and persistant storage

TestLab1_2.zip Download TestLab1_2.zip

Lab 1:3 - Bluetooth Communication

 

Borrow a hardware device

In the first part of the course, you can run and debug your applications on the emulator. When programming for sensors, Bluetooth, etc. the applications can only run on a real device. If you haven't got one, you can borrow an Android device for the duration of the course (contact Jonas Willén).

Additional Android Resources

Android Guides: https://developer.android.com/guide Links to an external site.

Stanford course: https://www.youtube.com/playlist?list=PLXOcyuD_gdPeYwGfQE6B2WJJm2X9lrWgX Links to an external site.

Kotlin youtube snippets: https://www.youtube.com/@PhilippLackner Links to an external site. 

 

Resources

Android Studio

Android Studio is the preferred IDE for developing Android applications: https://developer.android.com/studio Links to an external site.

If you encounter the error message "Missing system image" when running your app on an AVD, start the AVD Manager (Tools/AVD Manager), select a device, and then Actions/Download to download the image.

Shortcuts in Android Studio

There are many shortcuts making it easier and faster to write code. Some useful are

  • Autocompletion of code: TAB
  • Auto import and similar fixes: ALT-TAB
  • Format code: CTRL-ALT-L
  • Generate getters/setters/toString/constructors etc: ALT-INSERT

More: https://developer.android.com/studio/intro/keyboard-shortcuts Links to an external site. ("writing code")