Module 4: Advanced Android Development
A4 | Overview |
---|---|
Worth: | 8% |
Due: | Nov 27 |
Hand-in: | A link to a private GitHub repository, with yourself and me (@michaelhaaf ) as collaborators |
Notes: | Course late penalty applies. |
This assignment will be very similar to Assignment 3: you will complete some codelabs and commit your progress as you go.
Note: for our assignment, it is more straightforward to download the starter code directly rather than using git clone
(you will run into submodule issues if you clone directly into your assignment-4 repository). I have provided the starter code links directly below. You can also check out the Tips section for a link to Getting Started instructions.
This time, you will choose three of the following codelab sets to complete.
- (Required): Using Datastore for data persistence (~30mins)
- Link to starter code: Datastore starter code .zip
- (Required): choose one of the following codelabs:1
- Starting Android Accessibility (~15mins).
- Shorter and simpler, but uses the old View model (and not Jetpack Compose)
- Link to starter code .zip
- Accessibility in Jetpack Compose (~40mins).
- A bit longer, but directly applies to Jetpack Compose.
- Link to starter code .zip
- Starting Android Accessibility (~15mins).
- (Option 1): Complete all three of the following (~45 mins total). No starter code, just follow assignment instructions:
- (Option 2): Complete both of the following (~45 mins total). For starter code, click “Download Zip” in the instruction set:
The actual coding part of this assignment is explained in each codelab, so there are no other instructions as such.
The git and Github skills required for this lab are the same as Assignment 3, and are documented in more detail in the git and advanced git lectures.
- Build on Jetpack Compose / Android development knowledge
- Practise git/GitHub skills
Your submission will be a private GitHub repository, with @michaelhaaf invited as a collaborator, called Assignment 4 (or similar, the name isn’t that important). The rest of the requirements in the marking scheme below are things that should be in that repository by the deadline.
Tentative Marking Scheme
The exact weights may change slightly, but should serve as a guide for the rough proportions for each part of the assignment.
- (8) A main branch containing your initial code (the two codelab starting points)
- (36, 12 per codelab) A development branch for each codelab tracking your progress through that codelab
- (36, 12 per codelab) An open pull request2 from each development branch to
main
There are a total of 80 marks available. The rubric details for each requirement follow in the sections below.
- (2) Repository requirements met (private, @michaelhaaf collaborator, begins as bare repository with only default Initial commit)
- (2) Android template
.gitignore
, either included in Initial commit, or added in a subsequent commit immediately after. Don’t forget this step — your subsequent commits will be affected by the presence of this file in an important way. - (4) Initial commits representing the addition of whatever relevant starter code is necessary for your codelabs
Suggestion: This repo should begin as a bare repository with nothing and only yourself and me (@michaelhaaf) as collaborators. Do not fork another branch to begin this repository. See Getting Started for more details, whether you are starting from scratch or you have progress from the previous version of this assignment you want to adapt.
The following requirements apply to both development branches (15 marks for each codelab)
- (5) Marks for progress on the codelab itself
- If you finish the whole codelab, you get full marks — partial marks for partial progress.
- Feel free to make use of the guided solutions provided in the tutorial — make sure you try the steps yourself and understand the accompanying tutorial. Most of the marks are for your commit messages explaining the changes made, as you’ll see below.
- (10) Marks for quality of commit messages tracking your progress
- Your commit history should document each functional change required by the labs into separate commits.
- Commit messages should demonstrate best practises outlined in the git/github lecture notes.
NOTE: The idea isn’t to get it perfect the first time! One of the goals of this lab is to practise Tailoring commit history so that you can Update Pull Requests with confidence (links go to relevant lecture notes). That is, learning how to use git
to rewrite/tweak/edit/squash/create local branch commits before pushing/updating a pull request.
The following requirements apply to both development branches (12 marks for each codelab)
- (6) Marks for pull request management
- should be a linear set of commits from the appropriate branch
- updates to the pull request done directly, rather than creating new pull requests
- pull request template used for entering codelab progress / answering codelab questions. This should be pushed to main branch after the previous initial commits. Link to sample template from Assignment 4
- (6) Marks for progress on codelab documented. Rather than answering questions about the codelab, you should instead write a short (less than a few paragraphs) explanation of the main techniques learned in each codelab.
The Pull Request template you are using/adapting is explained in more detail in the Creating a Pull Request template section.
The codelabs are self documented and contain links to supplementary readings for any concepts you need clarification about. You can also see the following lecture notes for each codelab:
- Datastore persistence: see Data Persistence
- Accessibility: see Accessibility
- Kotlin functional manipulation / extensions / generics : see Advanced Kotlin
- Kotlin coroutines: see Kotin coroutines and ViewModel, StateFlow, and Sideeffects
The tips provide below aren’t comprehensive (e.g. there’s no step-by-step instructions for creating the repository) or all strictly necessary (i.e. there’s more than one way to meet the requirements of the assignment stated above) but should serve as a useful guideline for the main tasks.
- To see what your repository should look like (and to see how each codelab starts), you can see My example, partially-complete, Assignment 4 repository
- For creating the initial repository and commits (make sure to adapt these steps to the A4 codelabs), see Getting Started (Assignment 3)
- Using developer branches: see Using developer branches
- Writing good commit messages: see Commit best practises
- Making precise commits: see Making precise commits
- Tailoring commit history: see Tailoring commit history
- Creating a pull request template: see Creating a pull request template
- Updating pull requests: see Updating pull requests
- Creating a pull request template: see Creating a pull request template
-
Note: I originally assigned Accessibility in Jetpack Compose, but since then I found a shorter/more straightforward codelab, Starting Android Accessibility. You only need to do one of them. ↩
-
Note: you shouldn’t merge these pull requests into main. Keep them separate from main and open! ↩