Skip to content

mobileappdevhm20/w3

Repository files navigation

Week 3 Assignment - Timer

This is assignment 3 of the 'mobile application development' course at Munich University of Applied Sciences.

Basics for this assignment

Follow lesson 4 'Activity & Fragment Lifecycle' in the udacity course or read 04.1 and 04.2 in Google codelabs.

What to do with this repository

The basic steps are:

  1. Clone the repository
  2. You can create your own development branch or work with the master branch.
  3. Read the assignment steps on Moodle Assignment 'Week 3 - Lesson 4 of online course' or down below.
  4. Start coding and have fun.

Assignment

Create an app with a timer. Your app has the following functionality:

  • There is a timer in the main activity. The main activity shows the updating timer value.
  • The user can set a start value for the timer (see the dialog fragment in the starter code or use your design).
  • Start the timer with a button
  • Pause the timer with a button
  • Stop the timer with a button and reset the timer back to its start value

The app should also have the following features:

  • The timer pauses if you send the app to the background.
  • The timer continues where it was paused if you bring the app back to the foreground.
  • Flipping your phone does not reset the timer.
  • Log the counting timer value in LogCat (Tipp: Use Timber as suggested in the udacity course or the codelabs material)

The timer can either indefinitely count up or indefinitely count down. Think about stopping the timer when it makes sense.

!!! Do not forget to commit and push your changes AND submit the link to your repository in Moodle!!!

Example how the app could look like:

Git basics

The basics are for console users. There are also buttons for these commands in Android-Studio. See this for graphical use.

git clone <repository-url> - Clone a repository you want to work on
git checkout -b <new_branchname>  - check out all the content you are working on to a new branch with specified name
git checkout <branchname>  - check out to another already existing branch
git stash - store all changes made to the stash so the working directory is 'clean' and you can e.g. switch branches
git stash apply - apply all changes stored to the stash back to the working directory
git add <files>  - To add files you want to commit later locally
git commit -m "<message>" - Commit your added changes to the staging phase locally
git push - Push your changes to the remote repository

For interested command-line users read this

How to make useful git messages (git commit -m ")

  • Do not make it longer than 50 characters
  • Describe what you have changed
  • Start with a verb e.g. Added, Fixed, Removed, etc.
  • Stick to either present or past tense over all your commits. Further reading.

More questions?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages