This is assignment 4 of the 'mobile application development' course at Munich University of Applied Sciences.
Follow lesson 6 'Persistence' in the udacity course or read 06.1, 06.2, and 06.3 in Google codelabs.
- Clone the repository
- You can create your own development branch or work with the master branch.
- Read the assignment on Moodle Assignment 'Week 4 - Lesson 6 of online course' or down below.
- Start coding and have fun.
Extend your timer app to timers (multiple timers). In your timer app last week, you have a single timer and you need to change your start time depending on what you want to do. This week you use a room database to store your favorite timers (e.g. a timer for brushing your teeth, a timer for cooking hard-boiled easter eggs, a timer for cooking spaghetti, etc.). No more changing start times, just select the appropriate timer from your list of timers.
Extend your timer app or start with the code provided in this repository.
- Create a database for timers.
- A timer has a time in seconds and a name.
- Define a DAO for timers to insert, update, and delete a timer; use a query to sort the timers in ascending order by length of time
- Extend your timer app to list all the timers in your database. The user can select a timer in the list to start it. Check the code in this repository to see how to use a
RecyclerView
. If you don't want to use your timer, you can use the Android built-in timer, which is part of Common Intents. You find it in theTimer.kt
in this repository. - The user should be able to create a timer, to delete a timer, to change time and name of a timer, and to sort the list of timers.
Screenshot of the starter code in the repository:
You might have checked Travis-ci for your builds. Travis-ci is a continuous integration server. The .travis.yml
file in your repo configures Travis-ci. For this repo, we want to use continuous deployment of the apk that Travis-ci builds back to Github. The .travis.yml
has a deploy script. You need to add an environment variable to your repository settings in Travis-ci.
- Go to https://github.com/settings/tokens/new to create a new personal access token. Enter
travis-ci-release-token
in the 'Note' text field and check the 'repo' checkbox. Click 'Generate token'. - Copy the token you see.
- Go to https://travis-ci.com/ and go to your w4- repository. Click on 'More options -> Settings', scroll to 'Environment Variables'
- Enter a new Environment Variable called GITHUB_API_KEY
To read more about Anroid and Travis-ci go to https://medium.com/android-bits/android-app-from-scratch-part-5-continuous-integration-with-travis-ci-1a6d30d22822.